|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-12 21:19 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 22:00:02 2025 UTC |
Description: ------------ Hi, if using ob_start("ob_gzhandler") in combination with flush() it seems php send wrong HTTP header to the Browser (see Reproduce code). Thank you Hans-J?rgen Petrich Tested with Linux OS (Kernel 2.4.20) Apache2 (2.0.47) PHP 4.3.4RC1 (as Apache2 Handler) './configure' '--with-mysql=/usr' '--with-zlib' '--with-apxs2' default php.ini-dist is used Reproduce code: --------------- <?php ob_start("ob_gzhandler"); //header('Content-Encoding: gzip'); //header('Vary: Accept-Encoding'); ?> <html> <body> <p>This should be a compressed page. <? flush();?> </html> <body> Expected result: ---------------- HTTP/1.1 200 OK Date: Sat, 11 Oct 2003 16:53:06 GMT Server: Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6b DAV/2 PHP/4.3.4RC1 X-Powered-By: PHP/4.3.4RC1 Content-Encoding: gzip Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=ISO-8859-1 Actual result: -------------- HTTP/1.1 200 OK Date: Sat, 11 Oct 2003 16:53:36 GMT Server: Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6b DAV/2 PHP/4.3.4RC1 X-Powered-By: PHP/4.3.4RC1 Connection: close Content-Type: text/html; charset=ISO-8859-1