ID: 49816
Comment by: php at fostam dot franken dot de
Reported By: paul at wcclan dot net
Status: Assigned
Bug Type: Apache2 related
Operating System: *
PHP Version: 5.*
Assigned To: johannes
New Comment:
It seems that using flush() together with zlib compression results in
missing "Content-Encoding: gzip" header if the output length is less
than 4096 characters.
Reproduce code (5.3.1):
<?php
ini_set("zlib.output_compression", true);
print str_repeat("x", 4095);
flush();
?>
Increasing the value to 4096 or higher will change the behaviour - the
headers are sent correctly then.
Previous Comments:
------------------------------------------------------------------------
[2009-11-19 15:59:01] [email protected]
Unfortunately flush() with apache2handler SAPI will also disable
compression. Like I've said in the commit it's temporary "fix" to at
least keep things working. The real fix requires doing MFH of new output
buffering code where this works fine.
Johannes, please reply, I've asked you several times now whether I can
merge the new and working output buffering code from HEAD (like I
already suggested before 5.3.0 was released!).
------------------------------------------------------------------------
[2009-11-18 21:19:12] paul at wcclan dot net
I might be reading this wrong, but aren't you just opting not to
compress with this code? If so, how do you explain that compression
worked fine before 5.2.11? If I am reading it wrong, great job on the
fix :)
------------------------------------------------------------------------
[2009-11-15 00:13:20] [email protected]
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=290765
Log: - Temporary hack to fix bug #49816 (works fine in HEAD which has
working output buffering..)
------------------------------------------------------------------------
[2009-11-14 22:28:40] [email protected]
Caused by fixing bug #49248 and does not happen with HEAD.
------------------------------------------------------------------------
[2009-10-26 13:05:08] [email protected]
At least you can disable zlib compression in script now.. :/
See bug #49248, fix for that borked the compression on Apache if you
use flush().
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/49816
--
Edit this bug report at http://bugs.php.net/?id=49816&edit=1