Add support for permessage-deflate WebSocket extension#3496
Open
segfault87 wants to merge 14 commits intoactix:mainfrom
Open
Add support for permessage-deflate WebSocket extension#3496segfault87 wants to merge 14 commits intoactix:mainfrom
permessage-deflate WebSocket extension#3496segfault87 wants to merge 14 commits intoactix:mainfrom
Conversation
Author
|
On the idea of implementing the extension outside of actix-http, I elaborated a bit at this comment: actix/actix-extras#479 (comment) |
asonix
approved these changes
Nov 9, 2024
Contributor
asonix
left a comment
There was a problem hiding this comment.
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.
Author
|
@robjtede Could you have a look at this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Feature
PR Checklist
Overview
This PR implements DEFLATE compression (specifically
permessage-deflateextension which defined at RFC 7692) support for WebSocket.The whole feature is flagged behind
compress-ws-deflatefeature.Currently, flate2 requires zlib for certain feature required by
permessage-deflateextension. Therefore using this feature will introduce extra zlib dependency.Also,
Codechas been modified to split intoEncoderandDecoderas 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.