Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable compression on control frames #1042

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonstaff
Copy link

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 🔗

#848

As noted in daltoniam#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant