I have a websocket client / server that works fine with Firefox and Chrome 18. It doesn’t work with the beta version of Chrome 19. I suspect that because of this browser, an extension with a frame extension that my server does not support is now used.
Chrome 19 beta sends this in his handshake: "Sec-WebSocket-Extensions: x-webkit-deflate-frame"
I am returning my server: "Sec-WebSocket-Extensions:"
But either this is not the right way to reject the extension, or something else is wrong that I will not catch. This is the only handshake that differs from what I see coming from working browsers.
Edit: Here is additional information. This is the handshake captured by Wireshark.
Handshake using Firefox 12:
GET / chatserver HTTP / 1.1
Host: (omitted for this entry)
User-Agent: Mozilla / 5.0 (Windows NT 6.1; WOW64; rv: 12.0) Gecko / 20100101 Firefox / 12.0
Accept: text / html, application / xhtml + xml, application / xml; q = 0.9, /; q = 0.8
Accept-Language: en-us, en; q = 0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: save, update
Sec-WebSocket-Version: 13
Origin: (omitted for this post)
Sec-WebSocket-Key: 2TKm4ozUQdNP17Lobt7IBg ==
Pragma: no-cache
Cache-control: no-cache
Update: websocket
HTTP / 1.1 101 Protocol Switching
Update: websocket
Connection: update
Sec-WebSocket-Accept: pSUB3BT9YUUd9n3mOeWY / 1uVqJE =
Handshake using Chrome 18:
GET / chatserver HTTP / 1.1
Update: websocket
Connection: update
Host: (omitted for this entry)
Origin: (omitted for this post)
Sec-WebSocket-Key: zuHLEC8pGvAMadarhCLXFA ==
Sec-WebSocket-Version: 13
HTTP / 1.1 101 Protocol Switching
Update: websocket
Connection: update
Sec-WebSocket-Accept: LMBSq6Bk9Kiv + zAbQlAL899pfzc =
Handshake using Chrome 19:
GET / chatserver HTTP / 1.1
Update: websocket
Connection: update
Host: (omitted for this entry)
Origin: (omitted for this post)
Sec-WebSocket-Key: TbwnVcuUiqGgZn7hxvxzvQ ==
Sec-WebSocket-Version: 13
Sec-WebSocket-Extensions: x-webkit-deflate-frame
HTTP / 1.1 101 Protocol Switching
Update: websocket
Connection: update
Sec-WebSocket-Accept: D45BJ + Vfydy1Upcs3Hze / nuiaS8 =
Sec-WebSocket-Extensions:
All server responses have \ r \ n end-lines and include additional \ r \ n at the end of the message.
FF12 and Chrome18 work - Chrome19 does not work . In Chrome19, the very next packet after responding to server confirmation is FIN / ACK. The connection is closed.
pi I also tried using a hyphen as the value of Sec-WebSocket-Extensions, but that didn't work either.