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

Fixed a problem that connection from Socket.IO Client v2 failed. #1020

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

penguinlab
Copy link
Contributor

@penguinlab penguinlab commented Nov 28, 2024

Fixes #1017

Fixed a problem that connection from Socket.IO Client v2 failed.

The cause is an error in the skip range of the index of the frame. It appears to have been introduced during the change between versions 2.0.9 and 2.0.11.

If there is no problem, please merge.

The cause is an error in the skip range of the index of the frame.
@mrniko
Copy link
Owner

mrniko commented Nov 28, 2024

Does it work with v4?

@penguinlab
Copy link
Contributor Author

Does it work with v4?

Yes. I tried connecting from the Socket.IO Client v2,v3,v4 and confirmed that it works.
Also, I confirmed that the processing of the data field of packets is not affected.

@mylostway
Copy link

mylostway commented Nov 28, 2024 via email

@penguinlab
Copy link
Contributor Author

penguinlab commented Nov 29, 2024

@mrniko
The cause of the bug is explained in more detail below.

The value of the namespace field of the CONNECT packet varies depending on the version of the Socket.IO Client. Specifically, QueryString is included in the value of the namespace field only when connecting from Socket.IO Client v2.

Due to this difference, the bug is only noticeable when connecting from Socket.IO Client v2.

The following is the Connection packet when connecting from Socket.IO Client v2, v3, v4.

Connect with Socket.IO Client v2 (socket.io-client: 2.5.0)

The value of namespace field contains a QueryString.

image

Connect with Socket.IO Client v3 (socket.io-client: 3.1.3)

The value of namespace field does not contain a QueryString.

image

Connect with Socket.IO Client v4 (socket.io-client: 4.8.1)

The value of namespace field does not contain a QueryString.

image

@mrniko mrniko added this to the 2.0.13 milestone Nov 29, 2024
@mrniko mrniko added the bug label Nov 29, 2024
@mrniko mrniko merged commit 37a6312 into mrniko:master Nov 29, 2024
2 checks passed
@mrniko
Copy link
Owner

mrniko commented Nov 29, 2024

Thanks for the explanation and your work! Merged

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

Successfully merging this pull request may close these issues.

JsonParseException is thrown when connecting from Socket.IO Client v2.
3 participants