Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.1k
GZipFilter: do not compress if Cache-Control: no-transform#12980
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
9c52600
tob8162ba
Compareb8162ba
to48ff3f2
Compare
I don't agree here. The RFCs talk about Following RFCs are relevant:
and https://datatracker.ietf.org/doc/html/rfc9110#section-7.7
Given this is just about proxies, I am pretty sure we should not merge this PR as it just makes the assumption that it is not allowed to gzip a response when the @tsawada If you have a use case where you do not want to gzip a response that has the |
tsawada commentedFeb 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for reviewing the PR and for explaining how to customize GZipFilter behavior! I agree that these standards are written for CDNs and proxies rather than for origin servers. From the client's perspective, the entire Play server functions as an origin server, and in that context, the GZipFilter can be considered part of the origin server. In my opinion, when an Action returns a Result with |
mkurz commentedFeb 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@tsawada I fully get your point from a dev's perspective. So in the end this boils down on what we think devs most likely want to express by adding the (btw, currently it seems only the gzip filter is modiying the content of a response anyway:https://github.com/playframework/playframework/tree/3.1.0-M1/web/play-filters-helpers/src/main/scala/play/filters) So, I was thinking about this... how about we solve this a bit more general and make it configurable in the gzip confighere?
So the implementation would look for all the keys of
Of course we should document this inhttps://www.playframework.com/documentation/3.0.x/GzipEncoding This would be bit more future proof and more customizable for devs IMHO |
My idea would also cover if you want to add |
Thanks! I personally don't need more flexibility than just ignoring Please let me know if you want me to modify this PR in that approach, or if it is easier for you to just leave it to you. |
Uh oh!
There was an error while loading.Please reload this page.
Pull Request Checklist
Purpose
I believe this improves adherence to the HTTP standards.
Ref#12981