Store data to buffers in default WebSocket protocol #728

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
4 participants

lautis commented Jan 25, 2012

Properly detect 0xFF as end-of-message marker. This makes sure that partial UTF-8 characters (signle character is splitted in multiple data chunks) or code points outside BMP do not cause connection breakages.

This is partial fix for #699. Emojis don't cause disconnection, but characters outside Basic Multilingual Plane are not decoded properly.

Store data to buffers in default WebSocket protocol
Properly detect 0xFF as end-of-message marker.
This makes sure that partial UTF-8 characters or
code points outside BMP do not cause connection
breakages (although they are still not decoded
correctly).
Contributor

einaros commented Jan 25, 2012

Would you mind adding a test case which captures the original issue?

lautis commented Jan 25, 2012

I didn't look as thoroughly as I should've for how to write tests. Added test cases for parsing single character splitted in multiple data chunks and non-BMP characters inside single buffer.

Contributor

einaros commented Jan 25, 2012

Great, that looks much better. Thank you!

Ah I just submitted a different work-around to this bug. This looks like it is probably a better fix.

Contributor

rauchg commented Dec 9, 2013

Switching to ws for this.

@rauchg rauchg closed this Dec 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment