|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-08-05 09:22 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
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.[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