Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper response when handleUpgrade fails #458

Merged
merged 2 commits into from
Dec 10, 2016

Conversation

darrachequesne
Copy link
Member

The kind of change this PR does introduce

  • a bug fix

Current behaviour

When the verify method fails, the current implementation closes the connection immediately, which is understood by some proxy (such as nginx) as if the server was not available (resulting in "upstream
prematurely closed connection while reading response header from upstream" error).

New behaviour

That commit make sure a proper response is sent before closing the connection.

Other information (e.g. related issues)

Fixes #283
Closes #454, fixes socketio/socket.io#2779

When the `verify` method fails, the current implementation closes the
connection immediately, which is understood by some proxy (such as
nginx) as if the server was not available (resulting in "upstream
prematurely closed connection while reading response header from
upstream" error). That commit make sure a proper response is sent
before closing the connection.
@darrachequesne
Copy link
Member Author

cc @julianlam @beatjoerg @vostrik

@vostrik
Copy link

vostrik commented Dec 8, 2016

Thank you!
Please, update npm package:
https://www.npmjs.com/package/socket.io

@julianlam
Copy link

julianlam commented Dec 8, 2016

Excellent work @darrachequesne 😄

Ping @barisusakli

@vpxavier
Copy link

vpxavier commented Apr 10, 2017

hello, is this added to socket.io 1.7.3?
Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants