CC: Tweaked

CC: Tweaked

42M Downloads

Websockets don't support deflate compressed frames

andrewlalis opened this issue ยท 2 comments

commented

Minecraft Version

1.16.x

Version

1.98.2

Details

I'm using a Spring Boot server to communicate with a computer, and the server is telling me that the CCTweaked websocket client is disconnecting with status code 1006, with reason "Failed to decompress a compressed WebSocket frame".

WebSocket frames sent by the embedded Tomcat servlet container, with default settings, are sent with the following header:

Sec-WebSocket-Extensions: permessage-deflate;client_max_window_bits=15

After disabling with the use of per-message deflate compression by adding the following VM argument, messaging worked nominally.

-Dorg.apache.tomcat.websocket.DISABLE_BUILTIN_EXTENSIONS=true

However, all modern browsers support permessage-deflate compression, and I can imagine that many websocket frameworks would choose to enable compression as a "sensible default", thus causing this somewhat obscure error. Therefore, I think it would make sense to support this compression in CC: Tweaked's own websocket implementation.

commented

That's very odd. We should support the permessage-deflate extension. I know we've seen issues with the *_no_context_takeover headers (see #695), but thought this worked fine.

commented

This appears to be fixed in 1.19.2+, I assume as a result of netty/netty#11413.