From:             linke at paralight dot ru
Operating system: FreeBSD / any?
PHP version:      4.3.4
PHP Bug Type:     *Web Server problem
Bug description:  Content-Type: text/html in 304 response header.

Description:
------------
In 'HTTP/1.1 304 Not Modified' response from PHP script where is a
'Content-Type: text/html'. 

rfc2616 tell us:

"The 304 response MUST NOT contain a message-body, and thus is always
terminated by the first empty line after the header fields."

I have read the discussioan about simular Bug #3299, but I think Apache
response is correct rather than PHP.

Reproduce code:
---------------
<?
header('HTTP/1.1 304 Not Modified');
header("Cache-Control: max-age=".($expire-$last_modified));
header("Expires: ".gmdate('D, d M Y H:i:s',$expire)." GMT");
?>

Expected result:
----------------
HTTP/1.1 304 Not Modified
Date: Mon, 08 Dec 2003 12:03:27 GMT
Server: Apache/1.3.28 (Unix) PHP/4.3.4
Connection: close
ETag: "49621b-10ca-3fd43c1b"
Expires: Tue, 07 Dec 2004 12:03:27 GMT
Cache-Control: max-age=31536000

(apache response from request to plain html file, without PHP).

Actual result:
--------------
HTTP/1.1 304 Not Modified
Date: Mon, 08 Dec 2003 12:15:05 GMT
Server: Apache/1.3.28 (Unix) PHP/4.3.4
X-Powered-By: PHP/4.3.4
Cache-Control: max-age=31536000
Expires: Tue, 07 Dec 2004 08:53:47 GMT
Connection: close
Content-Type: text/html

(PHP response)

-- 
Edit bug report at http://bugs.php.net/?id=26553&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26553&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26553&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26553&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26553&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26553&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26553&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26553&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26553&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26553&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26553&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26553&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26553&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26553&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26553&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26553&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26553&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26553&r=float

Reply via email to