Browsers that support the new websocket protocol fail to connect

Bug #835844 reported by Ryan Seddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Browsersock Firefox Extension
New
Undecided
Unassigned

Bug Description

Trying to connect to a browser socket in most new browsers will fail to connect, maybe due to the protocol changes? I can connect an iOS4 device to the current plugin but any newer browsers will fail.

Chrome 15 and above doesn't work as it's the first version to implement the latest stable protocol.

In the firefox 6 error console I get the following error when I try to connect to a browser socket:

Error: evt.target.wrappedJSObject is undefined
Source File: chrome://browsersocket/content/browsersocket.js
Line: 34

Revision history for this message
Ryan Seddon (seddon-ryan) wrote :
Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

I think it is about the new protocol. However, I am not sure if we have time to fix this anytime soon.

Revision history for this message
Ryan Seddon (seddon-ryan) wrote :

I'd be happy to have a look, do you have any pointers on where you think the problem might be?

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

Here is a Chromium blog post about moving to the new protocol. http://blog.chromium.org/2011/08/new-websocket-protocol-secure-and.html

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

As for the terminal file: Did you have some problems with the terminal as well? This fixes a problem for Mozilla? Does it still work with Chrome?

Revision history for this message
Ryan Seddon (seddon-ryan) wrote :

Browser socket works fine in browsers with the older protocol, so using the terminal file in Chrome 13 works fine connecting to an instance in FF6. As soon as I try Chrome 15 or FF6 with the terminal page it fails to connect.

Revision history for this message
Toni Ruottu (toni-ruottu) wrote :

There are four big changes. 1) the security handshake, which has been simplified in the new version of the protocol 2) new framing format 3) masking, which is kind of simple encryption but the keys are delivered in clear form with the sent messages, so it is not really an encryption. The idea is to prevent proxy hacking through cleverly crafted traffic 4) support for binary payload, this needs some changes in the API. Previously only unicode text was supported. See http://dev.w3.org/html5/websockets/#dom-websocket-send

Revision history for this message
Ryan Seddon (seddon-ryan) wrote :

Thanks Toni!

I've already done the new security handshake code. It uses SHA-1 now rather than MD5 so I've moved the crypto.js to use that.

I'll have a go at the rest and see if I can get it working.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.