Changeset 51589 in webkit
- Timestamp:
- Dec 2, 2009 12:19:47 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 17 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51586 r51589 1 2009-12-02 Fumitoshi Ukai <ukai@chromium.org> 2 3 Reviewed by Alexey Proskuryakov. 4 5 WebSocket handshake check query component of URL 6 https://bugs.webkit.org/show_bug.cgi?id=31617 7 8 * websocket/tests/echo-location_wsh.py: Added. 9 * websocket/tests/no-query_wsh.py: Added. 10 * websocket/tests/script-tests/url-with-credential.js: Added. 11 * websocket/tests/script-tests/url-with-empty-query.js: Added. 12 * websocket/tests/script-tests/url-with-fragment.js: Added. 13 * websocket/tests/script-tests/url-with-query-for-no-query.js: Added. 14 * websocket/tests/script-tests/url-with-query.js: Added. 15 * websocket/tests/url-with-credential-expected.txt: Added. 16 * websocket/tests/url-with-credential.html: Added. 17 * websocket/tests/url-with-empty-query-expected.txt: Added. 18 * websocket/tests/url-with-empty-query.html: Added. 19 * websocket/tests/url-with-fragment-expected.txt: Added. 20 * websocket/tests/url-with-fragment.html: Added. 21 * websocket/tests/url-with-query-expected.txt: Added. 22 * websocket/tests/url-with-query-for-no-query-expected.txt: Added. 23 * websocket/tests/url-with-query-for-no-query.html: Added. 24 * websocket/tests/url-with-query.html: Added. 25 1 26 2009-12-01 Shinichiro Hamaji <hamaji@chromium.org> 2 27 -
trunk/WebCore/ChangeLog
r51588 r51589 1 2009-12-02 Fumitoshi Ukai <ukai@chromium.org> 2 3 Reviewed by Alexey Proskuryakov. 4 5 WebSocket handshake check query component of URL 6 https://bugs.webkit.org/show_bug.cgi?id=31617 7 8 Tests: websocket/tests/url-with-credential.html 9 websocket/tests/url-with-empty-query.html 10 websocket/tests/url-with-fragment.html 11 websocket/tests/url-with-query-for-no-query.html 12 websocket/tests/url-with-query.html 13 14 * platform/KURLGoogle.cpp: 15 (WebCore::KURL::query): returns a null if query is not specified and returns an empty if query is specified but empty. 16 * websockets/WebSocketHandshake.cpp: 17 (WebCore::resourceName): added. add query component to path if specified. 18 (WebCore::WebSocketHandshake::clientLocation): 19 (WebCore::WebSocketHandshake::clientHandshakeMessage): 20 1 21 2009-12-01 David Levin <levin@chromium.org> 2 22 -
trunk/WebCore/platform/KURLGoogle.cpp
r51058 r51589 553 553 // an empty string when the query is empty rather than a null (not sure 554 554 // which is right). 555 return String("", 0); 555 // Returns a null if the query is not specified, instead of empty. 556 if (m_url.m_parsed.query.is_valid()) 557 return String("", 0); 558 return String(); 556 559 } 557 560 -
trunk/WebCore/websockets/WebSocketHandshake.cpp
r48270 r51589 75 75 } 76 76 77 static String resourceName(const KURL& url) 78 { 79 if (url.query().isNull()) 80 return url.path(); 81 return url.path() + "?" + url.query(); 82 } 83 77 84 WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ScriptExecutionContext* context) 78 85 : m_url(url) … … 140 147 } 141 148 } 142 builder.append( m_url.path());149 builder.append(resourceName(m_url)); 143 150 return builder.toString(); 144 151 } … … 149 156 150 157 builder.append("GET "); 151 builder.append(m_url.path()); 152 if (!m_url.query().isEmpty()) { 153 builder.append("?"); 154 builder.append(m_url.query()); 155 } 158 builder.append(resourceName(m_url)); 156 159 builder.append(" HTTP/1.1\r\n"); 157 160 builder.append("Upgrade: WebSocket\r\n");
Note: See TracChangeset
for help on using the changeset viewer.