that bad things can happen to websockets behind avast. We should understand the problem and make sure that SockJS behaves correctly.
Bug is even more interesting: on server-side, connection is considered open (it sent header handshake, etc), but client does not receive anything - headers are not sent over. Then, after server closes connection due to timeout, browser will receive all headers and any sent data and will trigger appropriate websocket callbacks, like onopen. So, as a result, if
you don't do any additional checks (or don't ignore onopen from non-current transport), everything will break. If you close websocket on client, because of additional close handshake in websocket protocol it is not getting closed immediately and has no effect.
I have issues reproducing that. I install "Avast Internet Security" (set the network to "Public/High risk zone", "friends list" only contains 127.x.x.x), but websockets seems to be working fine (Chrome and Firefox, port 80, 8080 and 4000). Any clues? (tested on windows xp sp2 and windows 7)
(port 80 is tested against: http://sockjs.popcnt.org/example-cursors.html - with "websockets" selected)
Surprisingly, "iframe-eventsource" and "iframe-htmlfile" seem to be not working. Interesting.
It is quite possible they fixed their issue. I'll try to update and test again.
Or that I did something wrong. Pusher guys also say that avast doesn't work. Btw I have avast 6.0.1367, trial.
I can confirm this, websockets don't work with old avast (on port 80 and 8080, they do work on 4000) (btw, Download link for avast 6.0.1289)
I've raised the issue on client sockjs/sockjs-client#34 for the session_id reuse thing.
iframe-eventsource and iframe-htmlfile are not working, but there is nothing we can do about it. Timeouts should detect it.
Apart form that, SockJS behaves reasonably - it falls back to other transport after timeout.
I'll do similar investigation for AVG. Is there anything else left for this particular bug?
With AVG Chrome and Firefox fail miserably. Looks like AVG is mangling the websockets connection.
I played a bit with AVG. The problem was in my configuration. Most importantly, AVG (similarly to AVAST) seem to block 'chunking/streaming' transports. No xhr-streaming or htmlfile working. But as opposed to AVAST, websockets seem to go through nicely.
It's important to test that SockJS falls back nicely (and quickly) behind AVG. But except from blocking streaming nothing is unusual.