Summary: | WebSocket: Invalid url should raise SYNTAX_ERR exception. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fumitoshi Ukai <ukai> | ||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, eric, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Fumitoshi Ukai
2009-12-17 22:44:13 PST
Created attachment 45125 [details]
WebCore: Invalid url should raise SYNTAX_ERR exception.
style-queue ran check-webkit-style on attachment 45125 [details] without any errors.
Comment on attachment 45125 [details]
WebCore: Invalid url should raise SYNTAX_ERR exception.
r=me
I wish we could get JavaScript line number for the error messages.
Committed r52399: <http://trac.webkit.org/changeset/52399> Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog M LayoutTests/websocket/tests/bad-sub-protocol-expected.txt M LayoutTests/websocket/tests/script-tests/url-parsing.js M LayoutTests/websocket/tests/url-parsing-expected.txt M WebCore/ChangeLog M WebCore/websockets/WebSocket.cpp Committed r52402 M WebCore/ChangeLog M WebCore/websockets/WebSocket.cpp M LayoutTests/websocket/tests/url-parsing-expected.txt M LayoutTests/websocket/tests/bad-sub-protocol-expected.txt M LayoutTests/websocket/tests/script-tests/url-parsing.js M LayoutTests/ChangeLog r52402 = e9ae8c0dad923306815a6290589fea519962d3b4 (refs/remotes/trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk Comment on attachment 45125 [details]
WebCore: Invalid url should raise SYNTAX_ERR exception.
websocket/tests/bad-sub-protocol.html -> failed
Created attachment 45258 [details]
Invalid url should raise SYNTAX_ERR exception.
(In reply to comment #6) > (From update of attachment 45125 [details]) > websocket/tests/bad-sub-protocol.html -> failed Seems it was failed because console message containing a non-printable character differs on windows. http://build.webkit.org/results/Windows%20Release%20(Tests)/r52399%20(7249)/websocket/tests/ protocol string should be ASCII string, so report bad protocol string with escaping. style-queue ran check-webkit-style on attachment 45258 [details] without any errors.
What's the status of this patch? Was it rolled out? (In reply to comment #10) > What's the status of this patch? Was it rolled out? Yes. patch#1 was landed at r52399, but it caused layout test failure on win (because of difference in console message of non-printable chars), so rolled out at r52402 by Adam Barth. patch#2 addressed the issue of the layout test failures by escaping non-printable characters in protocol string. Comment on attachment 45258 [details] Invalid url should raise SYNTAX_ERR exception. > +static WebCore::String encodeProtocolString(const WebCore::String& protocol) This is inside namespace WebCore, and doesn't need namespace prefixes. Please fix before landing. > + const UChar* characters = protocol.characters(); > + StringBuilder builder; > + for (size_t i = 0; i < protocol.length(); i++) { > + if (characters[i] < 0x20 || characters[i] > 0x7E) Why not just use protocol[i]? r=me Committed r52478: <http://trac.webkit.org/changeset/52478> |