TooTallNate / Java-WebSocket

A barebones WebSocket client and server implementation written in 100% Java.
http://tootallnate.github.io/Java-WebSocket
MIT License
10.53k stars 2.58k forks source link

Can't connect with Chrome 17 (17.0.948.0 canary) #46

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hi guys, im a french user of this websocket server, this one is for me the BEST opensource server, congratulation for your work !

I tried to connect with Chrome 17 but this version seems to use the hybi-17 protocol (just like Chrome 16), you can see that at : http://en.wikipedia.org/wiki/WebSocket#Browser_support

Regards, Vianvian

PS : sorry for my french accent :p

TooTallNate commented 12 years ago

We don't yet support draft 17.

TooTallNate commented 12 years ago

@Vianvian, try pulling from the repo. @Davidiusdadi added support for Draft 17 in #47.

ghost commented 12 years ago

I tried the commit from @Davidiusdadi with Chrome 17.0.949.0 but failed to connect.

Chrome 17 sent this handshake :

Connection:Upgrade Cookie:session=595c3606c4c03b773c49502fa9eb7fae Host:localhost:3129 Origin:http://localhost Sec-WebSocket-Key:1ba6X8gkuyMDQ/xIIqw0Lg== Sec-WebSocket-Version:13 Upgrade:websocket (Key3):00:00:00:00:00:00:00:00

and chrome 15 sent :

Connection:Upgrade Cookie:session=595c3606c4c03b773c49502fa9eb7fae Host:localhost:3129 Sec-WebSocket-Key:IB7IDC3TLjqJLGM1VpalcQ== Sec-WebSocket-Origin:http://localhost Sec-WebSocket-Version:8 Upgrade:websocket (Key3):00:00:00:00:00:00:00:00

Maybe the problem is that [Sec-WebSocket-Origin:http://localhost] is now [Origin:http://localhost]

Regards,

TooTallNate commented 12 years ago

Hmm, we need Sec-WebSocket-Version: 13 draft support now too I suppose :D

Davidiusdadi commented 12 years ago

The Sec-WebSocket-Version of draft17 is 13. They also seem to have skipped number 11 and 12..

Poorly is seems that the origin is not considered in any way by the drafts 10 and 17. Luckily this will be a 20 minutes fix...

@TooTallNate i'd reopen this issue ... if i only could

TooTallNate commented 12 years ago

Reopening...

TooTallNate commented 12 years ago

@Davidiusdadi are you taking care of this one?

Davidiusdadi commented 12 years ago

yes i will during this week. I just have to do very much for school.

TooTallNate commented 12 years ago

Ok cool, no rush. School comes first ;)

ghost commented 12 years ago

Same problem with Chrome 16 now released (hybi 17)

Davidiusdadi commented 12 years ago

Sorry that such a basic thing took so long. hybi 17( RFC 6455 ) should work now.

I hope you acknowledge.