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

[compress] Vary: Accept-Encoding must always be set #175

Merged
merged 2 commits into from
Jan 5, 2020

Conversation

dunglas
Copy link
Contributor

@dunglas dunglas commented Jan 5, 2020

Summary of Changes

Vary: Content-Encoding must always be set, even if the client doesn't support compression, to prevent corruption of intermediate caches such as Varnish.

This bug has been reported by @nicolas-grekas while working with Vulcain.rocks. Fun fact: Nicolas reported the exact same bug to PHP... 12 years ago 🙂

Copy link
Contributor

@elithrar elithrar left a comment

Choose a reason for hiding this comment

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

Can you make Accept-Encoding a constant to avoid future regressions? Replace all string literals with that.

Other than that: LGTM.

@elithrar elithrar self-assigned this Jan 5, 2020
@elithrar elithrar added the bug label Jan 5, 2020
@dunglas
Copy link
Contributor Author

dunglas commented Jan 5, 2020

@elithrar constant added

@elithrar elithrar merged commit f08afc1 into gorilla:master Jan 5, 2020
@elithrar
Copy link
Contributor

elithrar commented Jan 5, 2020

Thanks!

@dunglas dunglas deleted the compress-fix-vary branch January 15, 2020 23:08
@dunglas
Copy link
Contributor Author

dunglas commented Jan 15, 2020

Would it be possible to create a new tag containing this patch? Thank you very much!

aledbf added a commit to gitpod-io/gitpod that referenced this pull request May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants