Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hi,
i think i have spotted some other problems with the old hixie protocol:
number one can be reproduced by using the client here [1] while enabling debug in the client (enableTrace(True) as the first line in the main code)
number two can be exposed by simply using the client above and sending a big string. E.g. ws.send(100_1024_'a')
number three is explained here [2]
the proposed change should fix these issues. Please review and tell me if you find some problems.
also, i think in hybi protocol, when processing a message, if no mask is used, the function _extractMessageFromFrame() returns None, and an exception will be raised because None will be appended to an existing string.
thanks,
flavio
[1] https://gist.github.com/flaviogrossi/6345654
[2] http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-63