Changeset 112377 in webkit
- Timestamp:
- Mar 28, 2012 2:12:00 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r112374 r112377 1 2012-03-28 Li Yin <li.yin@intel.com> 2 3 [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response 4 https://bugs.webkit.org/show_bug.cgi?id=82432 5 6 Reviewed by Kent Tamura. 7 8 From RFC6455: http://tools.ietf.org/html/rfc6455#section-11.3.4 9 The |Sec-WebSocket-Protocol| header field must not appear 10 more than once in an HTTP response. 11 12 * http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt: Added. 13 * http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html: Added. 14 * http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header_wsh.py: Added. 15 (web_socket_do_extra_handshake): 16 (web_socket_transfer_data): 17 1 18 2012-03-28 Philippe Normand <pnormand@igalia.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r112364 r112377 1 2012-03-28 Li Yin <li.yin@intel.com> 2 3 [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response 4 https://bugs.webkit.org/show_bug.cgi?id=82432 5 6 Reviewed by Kent Tamura. 7 8 From RFC6455: http://tools.ietf.org/html/rfc6455#section-11.3.4 9 The |Sec-WebSocket-Protocol| header field must not appear 10 more than once in an HTTP response. 11 12 Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html 13 14 * Modules/websockets/WebSocketHandshake.cpp: 15 (WebCore::WebSocketHandshake::readHTTPHeaders): 16 1 17 2012-03-27 James Robinson <jamesr@chromium.org> 2 18 -
trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
r111554 r112377 577 577 Vector<char> value; 578 578 bool sawSecWebSocketAcceptHeaderField = false; 579 bool sawSecWebSocketProtocolHeaderField = false; 579 580 for (const char* p = start; p < end; p++) { 580 581 name.clear(); … … 653 654 m_response.addHeaderField(nameStr, valueStr); 654 655 sawSecWebSocketAcceptHeaderField = true; 656 } else if (equalIgnoringCase("Sec-WebSocket-Protocol", nameStr)) { 657 if (sawSecWebSocketProtocolHeaderField) { 658 m_failureReason = "The Sec-WebSocket-Protocol header MUST NOT appear more than once in an HTTP response"; 659 return 0; 660 } 661 m_response.addHeaderField(nameStr, valueStr); 662 sawSecWebSocketProtocolHeaderField = true; 655 663 } else 656 664 m_response.addHeaderField(nameStr, valueStr);
Note: See TracChangeset
for help on using the changeset viewer.