#34537 [Opn->Bgs]: Last-Modified header + Status: 200 results in 200 OK without body
| From: | sniper@php.net | Date: | Sun, 18 Sep 2005 20:25:09 +0000 |
| Subject: | #34537 [Opn->Bgs]: Last-Modified header + Status: 200 results in 200 OK without body | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85212@lists.php.net to get a copy of this message | ||
ID: 34537
Updated by: sniper@php.net
Reported By: alisencer at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: CGI related
Operating System: FreeBSD
PHP Version: 5.0.5
New Comment:
Expected behaviour. Please read more about the headers at:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Previous Comments:
------------------------------------------------------------------------
[2005-09-17 13:40:09] alisencer at gmail dot com
Description:
------------
This is with Apache2 (PHP as CGI). When setting a Last-Modified header,
apache/php automatically sets a 304 header and sends no body.
However if I additionally manually override the Status header with
header("Status: 200 OK");
The webserver responds with a 200 OK, however without any body. It also
keeps the HTTP-Connection open until the timeout.
Reproduce code:
---------------
<?php
header("Status: 200 OK");
header("Last-Modified: Fri, 26 Aug 2005 11:53:55 GMT");
echo "test";
?>
curl -D - -H 'If-Modified-Since: Sat, 17 Sep 2005 09:18:01 GMT'
http://url
Expected result:
----------------
==
HTTP/1.1 200 OK
Date: Sat, 17 Sep 2005 11:25:37 GMT
Last-Modified: Fri, 26 Aug 2005 11:53:55 GMT
test
==
Or alternatively:
==
HTTP/1.1 304 Not Modified
Date: Sat, 17 Sep 2005 11:26:16 GMT
==
Actual result:
--------------
HTTP/1.1 200 OK
Date: Sat, 17 Sep 2005 11:25:45 GMT
Server: Apache
(and then it hangs for a while, but no body is sent [checked with
Ethereal]).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34537&edit=1