-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Avoid adding gzip-encoding to requests implicitly #10691
Conversation
Go helpfully adds an Accept-Encoding: gzip header to requests by default, and silently uncompresses the response if it did so and the server added compression in response. While this is normally a good thing, in our case this means we silently add an extra "Accept-Encoding" header to requests before they get to the user container, and if the user container compresses the request in response we then pointlessly uncompress the response inside Queue Proxy. This commit picks up the new NewProxyAutoTransport method from pkg to avoid this behaviour.
Codecov Report
@@ Coverage Diff @@
## master #10691 +/- ##
==========================================
+ Coverage 88.12% 88.17% +0.05%
==========================================
Files 186 186
Lines 8898 8898
==========================================
+ Hits 7841 7846 +5
+ Misses 815 813 -2
+ Partials 242 239 -3
Continue to review full report at Codecov.
|
/lgtm |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: julz, vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
See knative/pkg#2006.
Go helpfully adds an Accept-Encoding: gzip header to requests by
default, and silently uncompresses the response if it did so and the
server added compression in response. While this is normally a good
thing, in our case this means we silently add an extra "Accept-Encoding"
header to requests before they get to the user container, and if the
user container compresses the request in response we end up pointlessly
uncompressing the just-compressed response inside Queue Proxy. This
commit picks up the new NewProxyAutoTransport method from pkg
to avoid this behaviour.
/assign @vagababov @markusthoemmes