-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for permessage-deflate
WebSocket extension
#3496
base: master
Are you sure you want to change the base?
Conversation
On the idea of implementing the extension outside of actix-http, I elaborated a bit at this comment: actix/actix-extras#479 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot here but I think overall this looks good :) It's unfortunate that this is a breaking change to the public API in a few places. I'm not sure what the plan is for a new major version of actix-http/actix-web although I assume there's no immediate plans for such a release.
@robjtede Could you have a look at this? |
PR Type
Feature
PR Checklist
Overview
This PR implements DEFLATE compression (specifically
permessage-deflate
extension which defined at RFC 7692) support for WebSocket.The whole feature is flagged behind
compress-ws-deflate
feature.Currently, flate2 requires zlib for certain feature required by
permessage-deflate
extension. Therefore using this feature will introduce extra zlib dependency.Also,
Codec
has been modified to split intoEncoder
andDecoder
as there are some cases when encoding and decoding take place in different producer/consumers. Still its interface is unmodified in order to prevent API compatibility breakage.A PR counterpart on actix-ws will follow.