engine.io-client icon indicating copy to clipboard operation
engine.io-client copied to clipboard

Client behind proxy without websocket support upgrades to websocket

Open svestka opened this issue 13 years ago • 4 comments

If a client is behind proxy without websocket support, it upgrades connection from polling to websockets anyway, which leads to unexpected hangs.

How to reproduce with nginx for example: Just create simple proxy without websockets support and point engine.io-client to port 80 (or whatever port your nginx server listen to)

location /engine.io/ {
    proxy_set_header   X-Real-IP         $remote_addr;
    proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto $scheme;
    proxy_set_header   Host              $http_host;
    proxy_set_header   X-NginX-Proxy     true;
    proxy_set_header   Connection "";
    proxy_read_timeout 86400;
    proxy_http_version 1.1;
    proxy_pass http://localhost:3000/engine.io/;
}

svestka avatar Sep 26 '13 09:09 svestka

@aeosynth do you think this is the same issue as https://github.com/LearnBoost/engine.io/pull/177 ?

rauchg avatar Jan 17 '14 18:01 rauchg

Fixed by LearnBoost/engine.io#222 ?

plievone avatar Mar 22 '14 20:03 plievone

I'm not able to reproduce the problem anymore, seems fixed.

I will keep an eye on it

svestka avatar Apr 19 '14 20:04 svestka

We definitely tested this. Closing. Thanks @peterslivka

rauchg avatar Apr 19 '14 20:04 rauchg