Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make sure SockJS works behind bad antiviruses #25

Closed
majek opened this Issue · 10 comments

2 participants

@majek
Owner

@mrjoes says

http://groups.google.com/group/sockjs/browse_thread/thread/d4cf931f28e65858

that bad things can happen to websockets behind avast. We should understand the problem and make sure that SockJS behaves correctly.

Reference:  https://github.com/LearnBoost/socket.io/wiki/Socket.IO-and-firewall-software

@mrjoes
Collaborator

Quick update:

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.

@majek
Owner

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)

@majek
Owner

Surprisingly, "iframe-eventsource" and "iframe-htmlfile" seem to be not working. Interesting.

@mrjoes
Collaborator

It is quite possible they fixed their issue. I'll try to update and test again.

@majek
Owner

Or that I did something wrong. Pusher guys also say that avast doesn't work. Btw I have avast 6.0.1367, trial.

@mrjoes
Collaborator
@majek majek referenced this issue in sockjs/sockjs-client
Closed

SockJS-client reuses session_id for fallbacks #34

@majek
Owner

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?

@majek
Owner

With AVG Chrome and Firefox fail miserably. Looks like AVG is mangling the websockets connection.

@mrjoes
Collaborator
@majek
Owner

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.

@majek majek closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.