Bug 78541 - [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
Summary: [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks: 50099
  Show dependency treegraph
 
Reported: 2012-02-13 14:53 PST by Alexey Proskuryakov
Modified: 2012-02-21 08:51 PST (History)
9 users (show)

See Also:


Attachments
proposed patch (52.23 KB, patch)
2012-02-13 16:07 PST, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
with more ChangeLog (52.37 KB, patch)
2012-02-13 16:19 PST, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-02-13 14:53:54 PST
With "hybi" protocol now published as RFC, it's hopefully reasonably stable.

<rdar://problem/10036695>
Comment 1 Alexey Proskuryakov 2012-02-13 16:07:08 PST
Created attachment 126855 [details]
proposed patch
Comment 2 WebKit Review Bot 2012-02-13 16:14:38 PST
Attachment 126855 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1

Tools/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 72 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alexey Proskuryakov 2012-02-13 16:19:22 PST
Created attachment 126859 [details]
with more ChangeLog
Comment 4 Kent Tamura 2012-02-13 17:15:50 PST
Comment on attachment 126859 [details]
with more ChangeLog

View in context: https://bugs.webkit.org/attachment.cgi?id=126859&action=review

> LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler.html:14
>  window.jsTestIsAsync = true;
> +if (window.layoutTestController)
> +    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);

IMO, we had better skip the hixie76 tests on platforms which enabled the RFC protocol in order to reduce testing time.
Anyway, this change is correct.
Comment 5 Alexey Proskuryakov 2012-02-13 17:31:14 PST
Comment on attachment 126859 [details]
with more ChangeLog

Skipping tests would mean that we could easily break platforms that use a different version. Anyway, let's hope that we can bring all ports to use this version soon.
Comment 6 WebKit Review Bot 2012-02-14 01:51:01 PST
Comment on attachment 126859 [details]
with more ChangeLog

Clearing flags on attachment: 126859

Committed r107689: <http://trac.webkit.org/changeset/107689>
Comment 7 WebKit Review Bot 2012-02-14 01:51:07 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Csaba Osztrogonác 2012-02-14 04:36:32 PST
(In reply to comment #6)
> (From update of attachment 126859 [details])
> Clearing flags on attachment: 126859
> 
> Committed r107689: <http://trac.webkit.org/changeset/107689>

This change made a test fail on Qt-WK2:
 
--- /ramdisk/qt-linux-32-release-webkit2/build/layout-test-results/http/tests/websocket/tests/hybi/bad-sub-protocol-non-ascii-expected.txt 
+++ /ramdisk/qt-linux-32-release-webkit2/build/layout-test-results/http/tests/websocket/tests/hybi/bad-sub-protocol-non-ascii-actual.txt 
@@ -12,9 +12,9 @@
 PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
 PASS new WebSocket("ws://127.0.0.1:8880/simple", "Â") threw exception Error: SYNTAX_ERR: DOM Exception 12.
 PASS new WebSocket("ws://127.0.0.1:8880/simple", "ă") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "?") threw exception Error: SYNTAX_ERR: DOM Exception 12.
+PASS new WebSocket("ws://127.0.0.1:8880/simple", "ďżż") threw exception Error: SYNTAX_ERR: DOM Exception 12.
 PASS new WebSocket("ws://127.0.0.1:8880/simple", "ďťż") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "?") threw exception Error: SYNTAX_ERR: DOM Exception 12.
+PASS new WebSocket("ws://127.0.0.1:8880/simple", "ďżž") threw exception Error: SYNTAX_ERR: DOM Exception 12.
 PASS new WebSocket("ws://127.0.0.1:8880/simple", "đ ") threw exception Error: SYNTAX_ERR: DOM Exception 12.
 PASS successfullyParsed is true
 
Have you got any idea?
Comment 9 Alexey Proskuryakov 2012-02-14 10:26:49 PST
Qt-WK2 hasn't been running this test before this change.

Qt already has custom results here, but only because an invalid UTF-8 sequence was printed as "?", not U+FFFD. This diff shows garbage instead.

I'm not seeing this on Mac, and given that this is a difference between WK1 and WK2 on Qt, my best theory is that this is an issue in WebKitTestRunner. Seems worth investigating in a separate bug.
Comment 10 Csaba Osztrogonác 2012-02-21 08:51:32 PST
(In reply to comment #9)
> Qt-WK2 hasn't been running this test before this change.
> 
> Qt already has custom results here, but only because an invalid UTF-8 sequence was printed as "?", not U+FFFD. This diff shows garbage instead.
> 
> I'm not seeing this on Mac, and given that this is a difference between WK1 and WK2 on Qt, my best theory is that this is an issue in WebKitTestRunner. Seems worth investigating in a separate bug.

I filed a new bug report on in https://bugs.webkit.org/show_bug.cgi?id=79118