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

socket-io-sticky-session broken with socket.io 2.4.1 #32

Closed
JohnXLivingston opened this issue Jan 23, 2021 · 3 comments
Closed

socket-io-sticky-session broken with socket.io 2.4.1 #32

JohnXLivingston opened this issue Jan 23, 2021 · 3 comments

Comments

@JohnXLivingston
Copy link

I don't understand why, but socket-io-sticky-session is broken with socket.io 2.4.1.

Here are the result of a curl request (I removed cookie values):

$ curl 'http://127.0.0.1:12341/socket.io/?EIO=3&transport=polling&t=NSlLG6p'  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0' -H 'Accept: */*' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Origin: http://localhost:12340' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: http://localhost:12340' -H 'Cookie:[......] -v
* Expire in 0 ms for 6 (transfer 0x560131cdaec0)
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x560131cdaec0)
* Connected to 127.0.0.1 (127.0.0.1) port 12341 (#0)
> GET /socket.io/?EIO=3&transport=polling&t=NSlLG6p HTTP/1.1
> Host: 127.0.0.1:12341
> Accept-Encoding: deflate, gzip
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0
> Accept: */*
> Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
> Origin: http://localhost:12340
> DNT: 1
> Connection: keep-alive
> Referer: http://localhost:12340/planning
> Cookie: [...]
> 
< HTTP/1.1 400 Bad Request
< Connection: close
< 
* Closing connection 0
@darrachequesne
Copy link

@JohnXLivingston there is an issue with Node.js >= 12, related to this commit and which would be fixed by #31.

On a related note, we've just published @socket.io/sticky: https://www.npmjs.com/package/@socket.io/sticky

The routing is based on the session ID, and not on the user IP address.

Repository: https://github.com/darrachequesne/socket.io-sticky

@JohnXLivingston
Copy link
Author

Thanks for your reply! That's perfect!

@Mohana-Manikandan
Copy link

Mohana-Manikandan commented Sep 22, 2022

Hello everyone ! Are there any plans on merging the Pull Request #31 ? We are currently stuck on Node v10 because of it.

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

No branches or pull requests

3 participants