gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

Cannot connect to xsockets.net websocket server from IE9. #126

Closed piotrfilipiuk closed 11 years ago

piotrfilipiuk commented 11 years ago

I have an error when connecting to the WebSocket server from IE 9. Everything works well when using Firefox and Chrome.

I use the following setup: WebSocket server: XSocket 2.0.3.1 (http://xsockets.net/) Web browser: IE 9

The output from the IE Console:

LOG: [WebSocket] debug enabled LOG: [WebSocket] policy file: xmlsocket://127.0.0.1:843 LOG: [WebSocket] connected LOG: [WebSocket] request header: GET /SimpleController/ HTTP/1.1 Host: 127.0.0.1:4502 Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: aVo5CFcxWWoyZnwHNUUkMg== Origin: http://localhost:52281 Sec-WebSocket-Version: 13 Cookie:

LOG: [WebSocket] response header: HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept:3z4fC46FtGSvBs61d0lQfgKYXJs=

[WebSocket] failed to parse response header line: Sec-WebSocket-Accept:3z4fC46FtGSvBs61d0lQfgKYXJs= LOG: [WebSocket] closed

Hence it fails during the handshake. I have the Flash socket policy file provided (I am using http://socketpolicyfile.codeplex.com/). I use the following javascript code:

Regards, Piotr

gimite commented 11 years ago

It looks like a bug in web-socket-js that it requires whitespace after ":" in the response header (Sec-WebSocket-Accept). I'll fix it. Thanks for the report.

piotrfilipiuk commented 11 years ago

When can I expect the issue to be fixed?

gimite commented 11 years ago

Sorry for late. It should be fixed in the repository.