Add decompressing roundtripper#184
Closed
vroldanbet wants to merge 6 commits intomainfrom
Closed
Conversation
FilterResp detects `Content-Encoding: gzip` and decompresses the body into plain bytes. But it never removed the `Content-Encoding: gzip` header before passing the response back to the client
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #184 +/- ##
==========================================
+ Coverage 69.30% 69.43% +0.13%
==========================================
Files 27 27
Lines 2864 2886 +22
==========================================
+ Hits 1985 2004 +19
- Misses 623 625 +2
- Partials 256 257 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1a1c559 to
0742331
Compare
This roundtripper makes sure to hand over to the application code a decompressed http.Request.Body. This centralizes the decompression at the reverse proxy layer.
0742331 to
0bb3bf2
Compare
tstirrat15
reviewed
Mar 4, 2026
Contributor
There was a problem hiding this comment.
This is the e2e test that replicates the observed behavior.
Contributor
|
According to the e2e test, both the transport change and the header copying change are necessary for the fix. I don't know that I feel super confident in the overall behavior, though. |
Contributor
|
Closing in favor of #185. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This roundtripper makes sure to hand over to the application
code a decompressed http.Request.Body. This centralizes
the decompression at the reverse proxy layer.