Starscream icon indicating copy to clipboard operation
Starscream copied to clipboard

Disable compression on control frames

Open jonstaff opened this issue 4 months ago • 0 comments

As noted in #848, compression should only be applied to data frames. When compression is applied to control frames, specifically to pong messages, a correctly implemented server will fail the websocket connection:

An endpoint MUST NOT set the "Per-Message Compressed" bit of control frames and non-first fragments of a data message. An endpoint receiving such a frame MUST Fail the WebSocket Connection.

From the RFC: https://datatracker.ietf.org/doc/html/rfc7692#section-6.1

We noticed that our app was getting disconnected every 20 seconds (when a ping times out). This resolves that problem.

Issue Link 🔗

https://github.com/daltoniam/Starscream/issues/848

jonstaff avatar Oct 12 '24 20:10 jonstaff