How to disable the addition of “Vary: Accept-Encoding” to the output when using “zlib.output_compression=On”?
How to disable the addition of “Vary: Accept-Encoding” to the output when using “zlib.output_compression=On”?
zlib.output_compression:
Whether to transparently compress pages. If this option is set to "On"
in php.ini or the Apache configuration, pages are compressed if the
browser sends an "Accept-Encoding: gzip" or "deflate" header.
"Content-Encoding: gzip" (respectively "deflate") and "Vary:
Accept-Encoding" headers are added to the output. In runtime, it can
be set only before sending any output.
1 Answer
1
At PHP documentation is exactly writen how it works.
zlib.output_compression boolean/integer Whether to transparently
compress pages. If this option is set to "On" in php.ini or the Apache
configuration, pages are compressed if the browser sends an
"Accept-Encoding: gzip" or "deflate" header. "Content-Encoding: gzip"
(respectively "deflate") and "Vary: Accept-Encoding" headers are added
to the output. In runtime, it can be set only before sending any
output.
By me its impossible change this logics. Otherway is to change PHP source code, recompile it and use it as you need. But this must be done manually after each PHP update. Not good way.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
You have maybe problem which is possible solve it by another way.
– step
Jul 1 at 5:51