Skip to content

Add decompressing roundtripper#184

Closed
vroldanbet wants to merge 6 commits intomainfrom
add-decompressing-roundtripper
Closed

Add decompressing roundtripper#184
vroldanbet wants to merge 6 commits intomainfrom
add-decompressing-roundtripper

Conversation

@vroldanbet
Copy link
Copy Markdown
Contributor

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.

tstirrat15 and others added 2 commits March 3, 2026 12:35
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
@github-actions github-actions Bot added area/tooling Affects the dev or user toolchain area/core labels Mar 4, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.43%. Comparing base (067637c) to head (7d5ff16).

Files with missing lines Patch % Lines
pkg/proxy/server.go 75.00% 3 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vroldanbet vroldanbet force-pushed the add-decompressing-roundtripper branch from 1a1c559 to 0742331 Compare March 4, 2026 16:04
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.
@tstirrat15 tstirrat15 marked this pull request as ready for review March 4, 2026 16:27
Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

Comment thread e2e/proxy_test.go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the e2e test that replicates the observed behavior.

@tstirrat15
Copy link
Copy Markdown
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.

@tstirrat15
Copy link
Copy Markdown
Contributor

Closing in favor of #185.

@tstirrat15 tstirrat15 closed this Mar 4, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/core area/tooling Affects the dev or user toolchain

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants