-
Notifications
You must be signed in to change notification settings - Fork 694
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
Provide info whether websocket_recv'ed message is binary or not #1167
Comments
venthur
changed the title
Provode info whether websocket_recv
Provode info whether websocket_recv'ed message is binary or not
Jan 27, 2016
venthur
changed the title
Provode info whether websocket_recv'ed message is binary or not
Provide info whether websocket_recv'ed message is binary or not
Jan 27, 2016
forward op codes: 0x1 (text) and 0x2 (binary), and doing something with op code 0x0 (continuation) |
text message must be utf-8. |
@methane he is talking about op codes of websocket frame |
@miguelgrinberg says miguelgrinberg/python-engineio#275 is due to a bug in uwsgi code regarding the improper support of binary data. Do you agree @xrmx @unbit? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
this bug is related to #1160 (autobahn testsuite failing for fragmented messages). For the echoserver provided in #1160 the testsuite fails also for a lot of unicode-, text- and binary related messages. The problem is, that the server has to guess wether the client sent binary or not. My solution is to try to
decode
the message and catch anyUnicodeDecodeError
s and assume its binary then. Butwebsocket_recv
should really provide the info weather the message is binary or not. Since this distinction is made somewhere in the websocket protocol you can just forward this information. Otherwise there is no reliable way to guess weather a message is binary or text.The autobahn websocket implementation provides this message
is_binary
along with the message.The text was updated successfully, but these errors were encountered: