Skip to content

Conversation

@maunvz
Copy link

@maunvz maunvz commented Nov 17, 2023

Some socket.io client libraries, such as engine.io-client-java, include a line break in the base64 encoded binary V4 packets. Other server implementations (such as the nodejs module) handle this gracefully, this one currently throws an exception due to that unexpected char.

Adding logic to handle that gracefully since other servers do it, and to be compatible with older versions of libraries even if we were to change that behavior in the client.

engine.io-client-java reference (if they passed Base64.NO_WRAP we'd be fine...)
https://github.com/socketio/engine.io-client-java/blob/8519952a51baff36a2844d726876266b37ad6ffe/src/main/java/io/socket/engineio/parser/Parser.java#L46C21-L46C21

Note: There might be a better place earlier in the packet parsing logic that's more appropriate to handle this, I haven't read through the earlier stages, hoping someone can advise on that.

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

Successfully merging this pull request may close these issues.

1 participant