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

Issue when binary data is contains delimeter in case of websocket #490

Open
narad-muni opened this issue Jan 28, 2025 · 5 comments
Open

Comments

@narad-muni
Copy link

narad-muni commented Jan 28, 2025

According to EngineIO Websocket Spec, each packet is sent in its seperate websocket frame, and in case of polling it is encoded in base64.
But here packet.rs iresepective of what the mode is, the code is splitting the packet by delimeter. This causes incomplete or invalid packets in case of binary message in websocket mode.

@narad-muni
Copy link
Author

I would like to pick this up if possible.

@1c3t3a
Copy link
Owner

1c3t3a commented Jan 28, 2025

Ohh interesting! Feel free to, I am happy to review :)

@narad-muni
Copy link
Author

narad-muni commented Jan 28, 2025

Can you confirm if this is actually and issue ?
Also would like to get and entrypoint to get started.

@1c3t3a
Copy link
Owner

1c3t3a commented Jan 29, 2025

So reiterating on this: I don't really think it is an issue because we operate above the transport (websocket, polling, etc) layer. So this code works on already transmitted bytes and parses them accordingly. With your issue request I kinda expected that you found a concrete issue where this is wrong (e.g. data containing websocket delimiters). If that's not the case, it's not an issue I guess.

@narad-muni
Copy link
Author

From what I can understand, the flow is get bytes from here websocket_general.rs then the bytes are converted to payload(packets) by splitting in here socket.rs.
This call leads to the binary packet being split incorrectly if delimiter is present in raw binary as in websocket it isn't base 64 encoded.

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

2 participants