#42362 [Opn->WFx]: PHP sends GZIP empty data after a 304 response
| From: | mike@php.net | Date: | Wed, 05 Sep 2007 17:38:39 +0000 |
| Subject: | #42362 [Opn->WFx]: PHP sends GZIP empty data after a 304 response | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117191@lists.php.net to get a copy of this message | ||
ID: 42362
Updated by: mike@php.net
Reported By: ob dot php at daevel dot net
-Status: Open
+Status: Wont fix
Bug Type: HTTP related
Operating System: Debian Etch
PHP Version: 5.2.3
New Comment:
Well, the key issue is, zlib.output_compression and ob_gzhandler are
not the same thing. Enabling zlib.output_compression starts the output
handler without regard whether there's output or not unless you disable
it again without sending output. ob_gzhandler is only initialized if
there's been output.
Previous Comments:
------------------------------------------------------------------------
[2007-09-05 14:30:02] ob dot php at daevel dot net
Yes of course if I disable the compression (with ini_set), there is not
the problem. But is it really to the script to check and correct an
internal behavior ?
An old script which use ob_start( 'gz_handler' ) doesn't meet this
"bug".
------------------------------------------------------------------------
[2007-09-04 12:33:58] jani@php.net
AFAICT, you're sending the 304 in your script, it's not done by PHP. So
in that case, isn't it your script that should turn off the compression?
------------------------------------------------------------------------
[2007-09-04 07:04:34] ob dot php at daevel dot net
The RFC say :
"The 304 response MUST NOT contain a message-body, and thus is always
terminated by the first empty line after the header fields."
Source : http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
(cf 10.3.5 "304 Not Modified" )
Actually PHP sent the "GZIP Magic Header" (I'm not talking about the
HTTP headers, but the start of a gzip compressed data).
------------------------------------------------------------------------
[2007-08-27 11:07:01] jani@php.net
How is this a bug when you tell in your request that you accept gzipped
data? Of course you get that header then.
------------------------------------------------------------------------
[2007-08-21 15:13:31] ob dot php at daevel dot net
I add : there is exactly 26 bytes between the 2 requests :
1f 8b 80 00 00 00 00 00 00 30 20 00 00 00 ff ff
30 00 00 00 00 00 00 00 00 00
So it seems to be the "gzip header".
------------------------------------------------------------------------
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/42362
--
Edit this bug report at http://bugs.php.net/?id=42362&edit=1