Changeset 51830 in webkit
- Timestamp:
- Dec 7, 2009 8:19:59 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51829 r51830 1 2009-12-07 Fumitoshi Ukai <ukai@chromium.org> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Fragments now make WebSocket URL parsing fail. 6 https://bugs.webkit.org/show_bug.cgi?id=32144 7 8 * websocket/tests/script-tests/url-parsing.js: 9 * websocket/tests/script-tests/url-with-fragment.js: Removed. 10 * websocket/tests/url-parsing-expected.txt: 11 * websocket/tests/url-with-fragment-expected.txt: Removed. 12 * websocket/tests/url-with-fragment.html: Removed. 13 1 14 2009-12-07 Fumitoshi Ukai <ukai@chromium.org> 2 15 -
trunk/LayoutTests/websocket/tests/script-tests/url-parsing.js
r51703 r51830 8 8 9 9 // This is what we currently do, but not what the spec says (as of Editor's Draft 1 December 2009). 10 // The spec says that the string passed to WebScoket constructor should be returned unchanged.11 10 shouldBe('(new WebSocket("ws://127.0.0.1/a/../")).URL', '"ws://127.0.0.1/"'); 11 12 shouldBe('(new WebSocket("ws://127.0.0.1/path?")).URL', '"ws://127.0.0.1/path?"'); 13 shouldBe('(new WebSocket("ws://127.0.0.1/path?k=v")).URL', '"ws://127.0.0.1/path?k=v"'); 14 15 // draft-hixie-thewebsocketprotocol-60 says If /url/ has a <fragment> 16 // component, then fail the parsing Web Socket URLs, so throw a SYNTAX_ERR 17 // exception. 18 shouldThrow('new WebSocket("ws://127.0.0.1/path#")'); 19 shouldThrow('new WebSocket("ws://127.0.0.1/path#fragment")'); 12 20 13 21 var successfullyParsed = true; -
trunk/LayoutTests/websocket/tests/url-parsing-expected.txt
r51703 r51830 6 6 PASS new WebSocket("ws://127.0.0.1:25/") threw exception Error: SECURITY_ERR: DOM Exception 18. 7 7 PASS (new WebSocket("ws://127.0.0.1/a/../")).URL is "ws://127.0.0.1/" 8 PASS (new WebSocket("ws://127.0.0.1/path?")).URL is "ws://127.0.0.1/path?" 9 PASS (new WebSocket("ws://127.0.0.1/path?k=v")).URL is "ws://127.0.0.1/path?k=v" 10 PASS new WebSocket("ws://127.0.0.1/path#") threw exception Error: SYNTAX_ERR: DOM Exception 12. 11 PASS new WebSocket("ws://127.0.0.1/path#fragment") threw exception Error: SYNTAX_ERR: DOM Exception 12. 8 12 PASS successfullyParsed is true 9 13 -
trunk/WebCore/ChangeLog
r51829 r51830 1 2009-12-07 Fumitoshi Ukai <ukai@chromium.org> 2 3 Reviewed by Alexey Proskuryakov. 4 5 Fragments now make WebSocket URL parsing fail. 6 https://bugs.webkit.org/show_bug.cgi?id=32144 7 8 * websockets/WebSocket.cpp: 9 (WebCore::WebSocket::connect): 10 1 11 2009-12-07 Fumitoshi Ukai <ukai@chromium.org> 2 12 -
trunk/WebCore/websockets/WebSocket.cpp
r51703 r51830 131 131 return; 132 132 } 133 if (m_url.hasFragmentIdentifier()) { 134 LOG(Network, "URL has fragment component %s", url.string().utf8().data()); 135 m_state = CLOSED; 136 ec = SYNTAX_ERR; 137 return; 138 } 133 139 if (!isValidProtocolString(m_protocol)) { 134 140 LOG(Network, "Wrong protocol for WebSocket %s", m_protocol.utf8().data());
Note: See TracChangeset
for help on using the changeset viewer.