[WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 09:12:00 +0000 (09:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 09:12:00 +0000 (09:12 +0000)
commit509da85ebb009b4fe121b294c8ee1d2dd490460d
treec7f20417c0ffc9a3d617826a0775a9cc49f12323
parentc287536f4a3b49c23314baae281a847458aec592
[WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response
https://bugs.webkit.org/show_bug.cgi?id=82432

Patch by Li Yin <li.yin@intel.com> on 2012-03-28
Reviewed by Kent Tamura.

Source/WebCore:

From RFC6455: http://tools.ietf.org/html/rfc6455#section-11.3.4
The |Sec-WebSocket-Protocol| header field must not appear
more than once in an HTTP response.

Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders):

LayoutTests:

From RFC6455: http://tools.ietf.org/html/rfc6455#section-11.3.4
The |Sec-WebSocket-Protocol| header field must not appear
more than once in an HTTP response.

* http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header_wsh.py [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocketHandshake.cpp