-
Notifications
You must be signed in to change notification settings - Fork 604
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
Opt-in for FHCRC in gzip compression #2696
Merged
mpilquist
merged 5 commits into
typelevel:main
from
AL333Z:opt-in-fhcrc-in-gzip-compression
Oct 30, 2021
Merged
Opt-in for FHCRC in gzip compression #2696
mpilquist
merged 5 commits into
typelevel:main
from
AL333Z:opt-in-fhcrc-in-gzip-compression
Oct 30, 2021
Conversation
This file contains 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
armanbilge
reviewed
Oct 29, 2021
Tests are failing: Basically, what's happening is:
The values I used are actually working if the gzip compression is run on a Mac (OS byte = I'll provide an update with a decent solution shortly. |
nikiforo
reviewed
Oct 29, 2021
armanbilge
reviewed
Oct 29, 2021
armanbilge
reviewed
Oct 29, 2021
armanbilge
approved these changes
Oct 29, 2021
Bakporting in #2701. |
armanbilge
added a commit
to armanbilge/fs2
that referenced
this pull request
Oct 30, 2021
Co-authored-by: Alessandro Zoffoli <alessandro.zoffoli@moneyfarm.com>
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.
Context here: http4s/http4s#5417
TL;DR:
This FHCRC flag is an optional feature that fs2 is opting-in to (with an implementation that looks good BTW), but unfortunately, many clients have/had a bugged implementation (e.g. netty/netty#11805) of it or perhaps don't even support it at all (and that's fine, as soon as they don't break 😄 ).
This PR is making it configurable, restoring a default of
0
(no FHCRC).The client can choose to opt-in by specifying the
fhCrcEnabled
property inDeflateParams
.Ideally, we should backport this to 2.x (for supporting http4s 0.22 as well).
Hopefully, I preserved the binary compatibility.