Bug 73630

Summary: [Qt] Change default WebSocket protocol to the latest one
Product: WebKit Reporter: Yuta Kitamura <yutak>
Component: WebKit QtAssignee: Yuta Kitamura <yutak>
Status: RESOLVED FIXED    
Severity: Normal CC: ahf, cmarcelo, hausmann, jesus, jturcotte, kenneth, laszlo.gombos, ossy, webkit.review.bot
Priority: P3 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Yuta Kitamura 2011-12-01 23:44:41 PST
Currently, WebKitQt only supports the old WebSocket protocol (hixie-76). The old protocol is known to have a security defect, and should be phased out into the new protocol.

The new protocol (hybi-17, which is going to be published as RFC6455 soon) is already implemented in WebCore and we can switch to the new protocol using WebCore::Settings.

LayoutTests for hybi-17 are running fine on Qt bots, hence we essentially just need to switch the default value of a Settings flag.

Qt folks, are you happy with this change? Maybe I should bring up this topic on webkit-qt list?

(Note: the old protocol and the new one are incompatible; if there's any existing service depending on the old protocol, it will break.)
Comment 1 Alexander Færøy 2011-12-07 02:23:16 PST
Sure, we would be happy with that change :)
Comment 2 Simon Hausmann 2011-12-09 00:06:02 PST
I'd say go for it. I'm not aware of anyone using the Qt port and relying on a particular web socket protocol version. I'm inclined to say that our interest is to follow the majority of the other ports in this regards and if there was a "project default" (that ports _may_ optionally deviate from), then I think we'd be in the group interested in following the default, at this point.
Comment 3 Jocelyn Turcotte 2011-12-09 01:31:32 PST
We never officially supported the InspectorServerQt in WebKit/qt but this will break the support for QtWebKit clients with it.

On the other hand I need this to be switched on to support the new remote inspector in WebKit2, so I'm looking forward to this :)
Comment 4 Yuta Kitamura 2011-12-19 05:30:15 PST
(In reply to comment #2)
> I'd say go for it. I'm not aware of anyone using the Qt port and relying on a particular web socket protocol version. I'm inclined to say that our interest is to follow the majority of the other ports in this regards and if there was a "project default" (that ports _may_ optionally deviate from), then I think we'd be in the group interested in following the default, at this point.

I'm fine with either following the project default or switching right now.

Before switching the project default, I'd like to confirm the hybi tests run fine on WebKit2 bots (and fix any issues if found). The tests aren't run at this moment as WebKitTestRunner lacks LayoutTestController.overridePreference() implementation.
Comment 5 Jesus Sanchez-Palencia 2012-03-14 10:38:32 PDT
What is the status of this?
Comment 6 Yuta Kitamura 2012-03-14 11:05:48 PDT
GTK already transitioned (bug 74064), Mac/Win/WK2 also transitioned (bug 78541). So I think, among the ports I'm aware of, Qt is the only one left on the old protocol.

Sounds like it's time to switch the flag for Qt, and also flip the WebCore-global default value.

I'd like to make the transition two-fold:
1) Complete the transition on Qt and make sure things are fine.
2) Flip the global default value and remove port-specific defaults.

Does this make sense? If so, I'm going to upload a patch that just changes Qt's default.
Comment 7 Yuta Kitamura 2012-03-14 11:06:53 PDT
(In reply to comment #6)
> I'd like to make the transition two-fold:
> 1) Complete the transition on Qt and make sure things are fine.
1.9) Announce webkit-dev about the transition.
> 2) Flip the global default value and remove port-specific defaults.
Comment 8 Jesus Sanchez-Palencia 2012-03-14 11:13:44 PDT
(In reply to comment #6)
> Does this make sense? If so, I'm going to upload a patch that just changes Qt's default.

I'm fine with it and according to previous comments here I believe the others also are.
Comment 9 Yuta Kitamura 2012-03-14 11:20:02 PDT
Created attachment 131887 [details]
Patch
Comment 10 Simon Hausmann 2012-03-15 13:43:33 PDT
Comment on attachment 131887 [details]
Patch

rs=me
Comment 11 Yuta Kitamura 2012-03-15 13:58:39 PDT
Comment on attachment 131887 [details]
Patch

Thanks!
Comment 12 WebKit Review Bot 2012-03-15 16:17:49 PDT
Comment on attachment 131887 [details]
Patch

Clearing flags on attachment: 131887

Committed r110905: <http://trac.webkit.org/changeset/110905>
Comment 13 WebKit Review Bot 2012-03-15 16:17:54 PDT
All reviewed patches have been landed.  Closing bug.