Changeset 230052 in webkit
- Timestamp:
- Mar 28, 2018 2:27:44 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r230046 r230052 1 2018-03-28 Daniel Bates <dabates@apple.com> 2 3 WebSocket cookie incorrectly stored 4 https://bugs.webkit.org/show_bug.cgi?id=184100 5 <rdar://problem/37928715> 6 7 Reviewed by Brent Fulgham. 8 9 * http/tests/websocket/tests/hybi/cookie_wsh.py: Added. Downloaded from 10 <https://github.com/w3c/pywebsocket/blob/b2e1d11086fdf00b33a0d30c504f227e7d4fa86b/src/example/cookie_wsh.py>. 11 (_add_set_cookie): 12 (web_socket_do_extra_handshake): 13 (web_socket_transfer_data): 14 * http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt: Added. 15 * http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html: Added. 16 1 17 2018-03-28 Matt Lewis <jlewis3@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r230051 r230052 1 2018-03-28 Daniel Bates <dabates@apple.com> 2 3 WebSocket cookie incorrectly stored 4 https://bugs.webkit.org/show_bug.cgi?id=184100 5 <rdar://problem/37928715> 6 7 Reviewed by Brent Fulgham. 8 9 A cookie received in a WebSocket response should be stored with respect to the 10 origin of the WebSocket server in order for it to be sent in a subsequent request. 11 12 Also removed a FIXME about implementing support for the long since 13 deprecated Set-Cookie2 header. 14 15 Test: http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html 16 17 * Modules/websockets/WebSocketChannel.cpp: 18 (WebCore::WebSocketChannel::processBuffer): 19 * Modules/websockets/WebSocketHandshake.h: 20 1 21 2018-03-28 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp
r228218 r230052 444 444 if (m_identifier) 445 445 InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(m_document, m_identifier, m_handshake->serverHandshakeResponse()); 446 if (!m_handshake->serverSetCookie().isEmpty()) { 447 if (m_document && cookiesEnabled(*m_document)) { 448 // Exception (for sandboxed documents) ignored. 449 m_document->setCookie(m_handshake->serverSetCookie()); 450 } 446 String serverSetCookie = m_handshake->serverSetCookie(); 447 if (!serverSetCookie.isEmpty()) { 448 if (m_document && cookiesEnabled(*m_document)) 449 setCookies(*m_document, m_handshake->httpURLForAuthenticationAndCookies(), serverSetCookie); 451 450 } 452 // FIXME: handle set-cookie2.453 451 LOG(Network, "WebSocketChannel %p Connected", this); 454 452 skipBuffer(headerLength); -
trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.h
r221275 r230052 53 53 const URL& url() const; 54 54 void setURL(const URL&); 55 URL httpURLForAuthenticationAndCookies() const; 55 56 const String host() const; 56 57 … … 87 88 88 89 private: 89 URL httpURLForAuthenticationAndCookies() const;90 90 91 91 int readStatusLine(const char* header, size_t headerLength, int& statusCode, String& statusText);
Note: See TracChangeset
for help on using the changeset viewer.