How can I get Chromium to send a new WebSocket handshake?

I came across this code change in Chromium . He says that Chromium now supports both handshake versions, which seem to confirm the code. I mean the second version of Wikipedia (draft-ietf-hybi-thewebsocketprotocol-06).

However, when I connect to my server, the only thing I get is the old version, i.e. including these headers:

Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 

but not a new version, which would be a request containing:

 Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw== 

What am I missing here? I downloaded the latest nightly build, and it was turned on more than two weeks ago, so that might not be the reason, I think.

How can I make WebSocket send a new acknowledgment version?

+4
source share
2 answers

You sent a link to the code for the server side of the handshake (there are several places that are likely to be used in Chrome, such as remote debugging and proxies for extensions).

If you really want to use the new version of the HyBi-07 protocol, you can try using this branch for the web-socket-js that I created. As soon as Chrome switches to the new protocol, web-socket-js will also switch by default. In order for web socket-js to work in a browser that already has WebSockets support, you will need to make small changes to it to use a different object name instead of WebSocket.

I expect Chrome / WebKit to add a new protocol soon. Please note that the changes to add support for binary files have only recently been decided so that Chrome can add a new protocol before the API fully supports the new functionality enabled by the protocol.

+4
source

The only browser I know that implements protocol 07 is the FF4 build:

http://www.ducksong.com/misc/websockets-builds/ws-07/

+1
source

All Articles