-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[vcl] Don't touch the accept-encoding header #28894
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
Conversation
It's fairly useless to change the accept-encoding (AE) header on the client side for three reasons: - the client knows best what it's capable of, and varnish should try to cater to the original intent - the AE header is overwritten before entering vcl_backend_fetch, so editing it on the client side as no impact on the backend transaction - varnish always asks for a compressed version to the backend, and what the backend replies dictates what varnish replies to the users. If the backend responded with uncompressed data, varnish understands it shouldn't try to compress the data at all note: all versions have been changed for the sake of consistency but both the 4.x and 5.x series have been EOL'd a (long) while ago and users should be encouraged to upgraded as soon as possible.
Hi @gquintard. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. |
@magento run all tests |
1 similar comment
@magento run all tests |
is there anything to do here? one functional test, but it doesn't to be related to this PR? |
Hi @ihor-sviziev, thank you for the review. |
|
@sidolov, indeed, that could be an issue that I missed. It really hinges on one question: do |
@sidolov let's drop that one, I don't know enough about Magento to guarantee it's safe. But the current code is still suboptimal, storing multiple versions of one object. I'll close this for now |
Hi @gquintard, thank you for your contribution! |
Hi, it's me again! So, it turns out that the And so I reviewed #1575 again with that new knowledge and while it meant well, it was unnecessary. |
Happy new year everyone! |
Hi @ihor-sviziev, thank you for the review. |
hi, we are almost at the one-year anniversary of that PR, is there something I can do to make it happen? |
@gquintard, unfortunately, this PR has low priority and will be processed after all high priority ones |
I think this will break ESI, when the backend is supporting brotli. |
Varnish clears the accept-encoding header in Bereq, so all the current logic is wasted. |
PROTIP: don't answer comments early in the morning, otherwise you'll have to correct yourself. Anyway... The fully accurate statement is: When caching, Varnish forces A test is usually more convincing, so here we go:
you can run it with
A sane backend should not break when using |
@gquintard: since you opened #38211 with the exact same changes, I think we can close this one? |
ah, I forgot about this guy. we can close either, but is there any chance this would get looked at? If not, we can just close both |
I have no idea. A few months ago Adobe started an initiative where they prioritize PR's that have most 👍 reactions. So if you can gather like 15 or 20 👍 on one of your PR's, chances will be a lot higher it will get picked up. I know it's a stupid rule, but it's what it is ... |
thanks, very good to know, lets social engineer some enthusiasm! |
It's fairly useless to change the accept-encoding (AE) header on the client
side for three reasons:
cater to the original intent
editing it on the client side as no impact on the backend transaction
the backend replies dictates what varnish replies to the users. If the
backend responded with uncompressed data, varnish understands it
shouldn't try to compress the data at all
note: all versions have been changed for the sake of consistency
but both the 4.x and 5.x series have been EOL'd a (long) while ago and users
should be encouraged to upgraded as soon as possible.
Contribution checklist (*)