[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