Skip to content

WebSocket compression support is broken #413

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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