Edit report at https://bugs.php.net/bug.php?id=65391&edit=1
ID: 65391 User updated by: nikcomestotalk at gmail dot com Reported by: nikcomestotalk at gmail dot com Summary: Unable to send vary header user-agent when ob_start('ob_gzhandler') is called Status: Verified Type: Bug Package: Output Control Operating System: any PHP Version: 5.4.17 Block user comment: N Private report: N New Comment: Not yet fixed, still getting "Vary: Accept-Encoding" only But working fine on version 5.3.2 and 5.2[Checked on my other server having this version on php] Previous Comments: ------------------------------------------------------------------------ [2013-08-06 05:26:45] yohg...@php.net [yohgaki@dev PHP-5.4]$ ./sapi/cgi/php-cgi <?php ob_start("ob_gzhandler"); header("Vary: User-Agent,Accept,Accept-Encoding"); ob_flush(); X-Powered-By: PHP/5.4.19-dev Vary: Accept-Encoding Content-type: text/html ------------------------------------------------------------------------ [2013-08-06 04:57:04] yohg...@php.net Oops, you have header("Vary: User-Agent,Accept,Accept-Encoding"); ob_start("ob_gzhandler"); ob_flush(); Change it to ob_start("ob_gzhandler"); header("Vary: User-Agent,Accept,Accept-Encoding"); ob_flush(); Then it should work. If it works, please close this bug. If not, please reopen. ------------------------------------------------------------------------ [2013-08-06 04:52:55] yohg...@php.net Reclassified as output control issue, since this is output issue. ------------------------------------------------------------------------ [2013-08-06 04:50:39] yohg...@php.net zlib module is the one writing Vary header. ------------------------------------------------------------------------ [2013-08-05 09:22:52] nikcomestotalk at gmail dot com Description: ------------ ob_start('ob_gzhandler') is overwriting vary-header "Vary: User- Agent,Accept,Accept-Encoding" to "Vary: Accept-Encoding" Not using apache level gzip Test script: --------------- header("Vary: User-Agent,Accept,Accept-Encoding"); ob_start("ob_gzhandler"); ob_flush(); Client side response header vary: Accept Encoding Expected result: ---------------- Vary: User-Agent,Accept,Accept-Encoding Actual result: -------------- vary: Accept Encoding ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65391&edit=1