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

Compatability issue with libwebsockets #134

Closed PhilLello closed 11 years ago

PhilLello commented 11 years ago

The current WebSocketMain.swf isn't working for me; flash connections are shown as protocol version 7, which makes no sense. I don't know if it is relevenant, but I'm serving content from a mini server written around libwebsockets, and the same port is used for both HTTP and WebSocket content. I don't seem to need a policy file with this setup, although will add one and see what happens.

PhilLello commented 11 years ago

Setting up a policy server made no difference.

The request headers I see in Firebug are: Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding gzip, deflate Accept-Language en-gb,en;q=0.5 Cache-Control no-cache Connection keep-alive, Upgrade Host 192.168.1.100:7681 Pragma no-cache Sec-WebSocket-Key bTswNMZbyKkH1kAM4kPC4g== Sec-WebSocket-Origin http://192.168.1.100:7681 Sec-WebSocket-Protocol telnet-protocol Sec-WebSocket-Version 7 Upgrade websocket User-Agent Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2

PhilLello commented 11 years ago

Turns out this was indeed down to the socket policy file, although I'd never has guessed it from the symptoms.