Skip to content

WebSocket compression support is broken #413

@robert-s-ubi

Description

@robert-s-ubi

Unfortunately, the recently added WebSocket compression support is broken due to a bug in the Java-WebSocket library (TooTallNate/Java-WebSocket#1496).

If WebSocket compression is enabled on a MultiProtocolJSONClient, the second message exchange with the MultiProtocolJSONServer yields an exception:

org.java_websocket.exceptions.InvalidDataException: invalid distance too far back
at org.java_websocket.extensions.permessage_deflate.PerMessageDeflateExtension.decodeFrame(PerMessageDeflateExtension.java:193)
at org.java_websocket.drafts.Draft_6455.translateSingleFrame(Draft_6455.java:589)
at org.java_websocket.drafts.Draft_6455.translateFrame(Draft_6455.java:762)
at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:394)
at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:229)

This can be worked around by changing the PerMessageDeflation configuration in MultiProtocolJSONClient perMessageDeflateExtension.setServerNoContextTakeover(false -> true), but that yields a much lower compression efficiency.

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