node.ws.js icon indicating copy to clipboard operation
node.ws.js copied to clipboard

Code incompatible with Chrome 14

Open raybellis opened this issue 12 years ago • 13 comments

Chrome 14 now uses the protocol version introduced in draft-ietf-hybi-thewebsocketprotocol-08

See http://groups.google.com/a/chromium.org/group/chromium-discuss/browse_thread/thread/97f3cb623c581395

raybellis avatar Sep 19 '11 13:09 raybellis

http://twitter.com/#!/_alanshaw/status/115914253654966273

Yeah, just figured that out too.

alanshaw avatar Sep 19 '11 22:09 alanshaw

Thanks for the heads up, would love to merge a pull request :)

ncr avatar Sep 20 '11 07:09 ncr

I'm not familiar enough with the protocol to figure out the differences, but I found a commit for another WebSocket library which might provide a good start:

https://github.com/Ragnis/node-websocket-server/commit/974424fb32650efce0b26eab167f48f0982f2d25

raybellis avatar Sep 20 '11 08:09 raybellis

sorry - didn't mean to close this!

raybellis avatar Sep 20 '11 08:09 raybellis

I'm happy to look into this. I'll have something ready soon.

alanshaw avatar Sep 22 '11 20:09 alanshaw

That's great because I'm a bit overworked recently ;)

ncr avatar Sep 23 '11 06:09 ncr

Any progress on this yet guys?

Roseole avatar Oct 20 '11 16:10 Roseole

Sorry, got about half way through and then got busy with other things. Back on it tonight.

alanshaw avatar Oct 20 '11 16:10 alanshaw

When my chrome update to 14, it not work, I search the web and find that the latest websocket draft is version 10, chrome12 use draft7.5,7.6, and chrome14 use draft10. Can you help to support the websocket10 draft.

kaven276 avatar Oct 21 '11 06:10 kaven276

The official RFC for WebSocket protocol is there: http://www.ietf.org/mail-archive/web/ietf-announce/current/msg09663.html

ncr avatar Dec 12 '11 09:12 ncr

Reimplemented this version supporting the latest protocol, also fixed some problems that the other solutions pointed above has. Also I think it might be faster since it doesn't read byte by byte

unfortunately I only tested draft10 and above I'll post it in a moment

ajscarvalho avatar Feb 11 '12 02:02 ajscarvalho

I have nothing against your patch being non-backwards compatible. I would even encourage it - the resulting code will be just simpler :)

ncr avatar Feb 13 '12 08:02 ncr

well It's not really a patch, I made major changes... I got some of the code from this branch, some from the https://github.com/Ragnis/node-websocket-server/commit/974424fb32650efce0b26eab167f48f0982f2d25 posted above and since it was not working for me, sometimes I would get some garbled messages I went out to find the possibles sources for the problem, read the specs, and produced something.

I'm still not happy about it, because it doesn't support some nice features like sending/receiving binary, but for now it works for me. You can find it on my projects.

ajscarvalho avatar Feb 13 '12 09:02 ajscarvalho