|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-27 13:16 UTC] iliaa@php.net
[2003-08-02 11:07 UTC] moriyoshi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 08:00:02 2025 UTC |
Description: ------------ I am using ob_gzhandler to compress the page output. Now I need to add an 'accept-language' to the Vary header, because my page content depends on the language settings of the browser. Anyhow, it is impossible to change the Vary header when using ob_gzhandler. It seems like ob_gzhandler is overriding an existing Vary header just before returning the compressed content to the browser. Expected behaviour: ob_gzhandler should check if a Vary header has already been set. If so, it should only ADD an "accept-encoding" unless already present, or should not change the Vary header at all. Reproduce code: --------------- <?php header("vary: accept-encoding,accept-language"); ob_start('ob_gzhandler'); print("<html><body>foo</body></html>"); ?> Expected result: ---------------- A HTTP header "vary: accept-encoding,accept-language" being returned. Actual result: -------------- A HTTP header "Vary: Accept-Encoding" (note the uppercase letters) will always be returned.