From: phpnet at shredzone dot de Operating system: Linux PHP version: 4.3.2 PHP Bug Type: Unknown/Other Function Bug description: ob_gzhandler overrides Vary header
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. -- Edit bug report at http://bugs.php.net/?id=24827&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24827&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24827&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24827&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24827&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24827&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24827&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24827&r=support Expected behavior: http://bugs.php.net/fix.php?id=24827&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24827&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24827&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24827&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24827&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24827&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24827&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24827&r=gnused