ID: 24827 Updated by: [EMAIL PROTECTED] Reported By: phpnet at shredzone dot de -Status: Open +Status: Closed Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 4.3.2 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-07-27 06:09:27] phpnet at shredzone dot de 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 this bug report at http://bugs.php.net/?id=24827&edit=1