php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26553 Content-Type: text/html in 304 response header.
Submitted: 2003-12-08 08:04 UTC Modified: 2003-12-08 08:10 UTC
From: linke at paralight dot ru Assigned:
Status: Not a bug Package: *Web Server problem
PHP Version: 4.3.4 OS: FreeBSD / any?
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: linke at paralight dot ru
New email:
PHP Version: OS:

 

 [2003-12-08 08:04 UTC] linke at paralight dot ru
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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-08 08:10 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 08:01:29 2024 UTC