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

wrong close frame status code parsing #9

Open
osanha opened this issue Apr 1, 2013 · 0 comments
Open

wrong close frame status code parsing #9

osanha opened this issue Apr 1, 2013 · 0 comments

Comments

@osanha
Copy link

osanha commented Apr 1, 2013

https://github.com/codebutler/android-websockets/blob/master/src/com/codebutler/android_websockets/HybiParser.java#L290

must be patched like below.

int code = (payload.length >= 2) ? ((payload[0] << 8) | (payload[1] & 0xFF)) & 0xFFFF : 0;

because, close status code is unsigned short value (0 ~ 65535). but java byte type is singed value (-128 ~ 127)

do test with status code 4504 or 65535.

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

1 participant