I have upgraded my node.js app to work with the latest socket.io module. However, now only Firefox can connect, Chrome and Safari give this error: Error during WebSocket handshake: 'Connection' header value is not 'Upgrade'
- 1Which versions of Chrome / Safari. Also try complaining in #socket.ioRaynos– Raynos2011-07-04 22:21:06 +00:00Commented Jul 4, 2011 at 22:21
- Google Chrome 12.0.742.112 / Safari 5.0.5 (6533.21.1)Tim– Tim2011-07-05 21:16:31 +00:00Commented Jul 5, 2011 at 21:16
- I am also experiencing this problem, using node 0.4.5 and socket.io 0.7.6 on dotcloud.user832395– user8323952011-07-06 20:58:12 +00:00Commented Jul 6, 2011 at 20:58
- Temporary solution is to disable native websockets and use xhr-polling instead. I asked in #socket.io, nobody seems to know whats up, its not a common problem. I get the problem even with the hello world example app.Tim– Tim2011-07-07 13:47:50 +00:00Commented Jul 7, 2011 at 13:47
- I have the same problem on Heroku, but they are using Nginx and state that they only support HTTP 1.0 (devcenter.heroku.com/articles/http-routing)Olivier Amblet– Olivier Amblet2011-11-06 02:27:07 +00:00Commented Nov 6, 2011 at 2:27
Add a comment |
3 Answers
Nginx is not compatible (out of the box) with HTTP 1.1, which is required for WebSockets. You will need to patch it (something I couldn't help you with, too much trouble) or you could use a node.js only stack.
I use node-http-proxy.
1 Comment
mikong
The development version of Nginx supports HTTP 1.1, so that's another option. :)
Check your Nginx version. v1.4 seems to work fine, whereas I had trouble with v1.2 (and had to upgrade).
1 Comment
Pete Romano
FYI, if upgrading to 1.4 on Ubuntu, this is the resource you need: slashgeek.net/2013/05/08/…