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

Packets with binary are encoded with the wrong packet type when using msgpack #811

Closed
ttarhan opened this issue Oct 26, 2021 · 0 comments
Closed
Assignees
Labels

Comments

@ttarhan
Copy link

ttarhan commented Oct 26, 2021

Describe the bug
When using the msgpack serializer, packets that contain binary data are encoded as BINARY_EVENT or BINARY_ACK, however, the Javascript Socket.IO implementation does not use these types when using msgpack. Since msgpack can already efficiently transmit binary data, the binary data is inlined (which does work in python-socketio) and the type is left as EVENT or ACK (which is wrong in python-socketio).

To Reproduce
Steps to reproduce the behavior:

  1. Configure a python-socketio server using serializer="msgpack"
  2. Connect a Javascript client to it using the official Socket.IO implementation
  3. Emit an event containing binary data from the server to the client
  4. The client will fail to decode the message

Expected behavior
The BINARY_EVENT type should be encoded as EVENT, and the BINARY_ACK type should be encoded as ACK.

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

No branches or pull requests

2 participants