Skip to content

wrong close frame status code parsing #9

@osanha

Description

@osanha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions