From: alisencer at gmail dot com
Operating system: FreeBSD
PHP version: 5.0.5
PHP Bug Type: CGI related
Bug description: Last-Modified header + Status: 200 results in 200 OK without
body
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 bug report at http://bugs.php.net/?id=34537&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34537&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34537&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34537&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34537&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34537&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34537&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34537&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34537&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34537&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34537&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34537&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34537&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34537&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34537&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34537&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34537&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34537&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34537&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34537&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34537&r=mysqlcfg