|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
38 - 34 = ?
Subscribe to this entry?

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


Add a Patch

Pull Requests

Add a Pull Request


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

not a bug.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 10:01:28 2023 UTC