ID:               27424
 Updated by:       [EMAIL PROTECTED]
 Reported By:      scottmacvicar at ntlworld dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Apache2 related
 Operating System: All
 PHP Version:      4CVS-2004-02-27 (stable)
 New Comment:

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-02-27 11:21:28] scottmacvicar at ntlworld dot com

Description:
------------
If you have zlib.output_compression = On in php.ini and echo some
content then flush under apache 2 then you'll get some binary data due
to the lack of headers.



I've had a look at the code and when you call flush() under Apache 2 it
has



SG(headers_sent) = 1;

sapi_apache2.c line 265



During php_request_shutdown() sapi_send_headers is called to add
appropriate gzip headers.



Within sapi_send_headers there is a check to see if headers have
already been sent. SAPI.c line 701.



I've read previous bug reports on flush and Apache 2 in particular, bug
#25701. Ilia mentions that Apache 2 and Apache 1 behave differently, on
flush Apache 2 sends any pending headers but in this case the gzip
headers haven't been added yet.



I can see two ways to handle this,

Disable zlib.output_compression if flush is called

or

Make flush do nothing if zlib.output_compression is enabled



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27424&edit=1

Reply via email to