Skip to content
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

Add KeepAcceptEncoding option, prevents proxy from changing Accept-Encoding sent by clients #320

Closed
wants to merge 3 commits into from

Conversation

bls
Copy link

@bls bls commented Jan 10, 2019

Hi,

This PR adds a new flag to the proxy, KeepAcceptEncoding. When disabled, proxy behaviour remains the same to avoid breaking existing clients.

The default behaviour is that the Accept-Encoding header on client requests is removed. The proxy outbound transport will then add an "Accept-Encoding: gzip" header to outbound requests.

With KeepAcceptEncoding enabled the proxy will pass the header through. Note that if you want the proxy to never modify Accept-Encoding, you should also set DisableCompression true on the proxy outbound transport (otherwise it will ask for gzip when the client does not send the header).

Fixes #102 for me.

@elazarl
Copy link
Owner

elazarl commented Apr 10, 2019

I now wonder why I added accept encoding, and not just send client's accept encoding.

In retrospect it looks like a mistake.

What does squid do?

@ErikPelli
Copy link
Collaborator

This feature has been integrated in #585. Closing this PR.

@ErikPelli ErikPelli closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing Accept-Encoding header
3 participants