Skip to content

Test 13 WebSocket Compression (different parameters) #112

@mortzdk

Description

@mortzdk

Hi I'm currently working on a websocket server in C.

At this point in time I pass all tests in the testsuite including the compression tests.

One interesting bug that occured in Firefox (after I passed all tests in the testsuite) was when no parameters was send with the permessage-deflate, I was not able to decompress the message.

According to the spec:

Absence of this extension parameter in an extension negotiation response indicates that the server can receive messages compressed using an LZ77 sliding window of up to 32,768 bytes.

I'm not really sure whether some of the tests actually do test this, but if they do, the behaviour is different from the behaviour of Firefox, since I passed all tests but still failed in Firefox.

My issue was solved by choosing the default_max_client_bits to be 15 (2^15 = 32,768 bytes) if the client did not send the client_max_window_bits parameter at all.

I use zlib and before solving the issue I used the value 0 for the windowSize of inflateInit2 or simply inflateInit where no windowSize needs to be given.

I'm not sure whether this is the job of the testsuite to catch such a bug, but at least now you know of the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions