#50007 [Opn->Fbk]: PHP working as FastCGI can't send Last-Modified header
| From: | jani@php.net | Date: | Tue, 27 Oct 2009 22:20:49 +0000 |
| Subject: | #50007 [Opn->Fbk]: PHP working as FastCGI can't send Last-Modified header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144033@lists.php.net to get a copy of this message | ||
ID: 50007
Updated by: jani@php.net
Reported By: vlad at todosv dot com
-Status: Open
+Status: Feedback
Bug Type: CGI related
Operating System: Any, but tested in Ubuntu
-PHP Version: 5.2.11
+PHP Version: 5.2.10
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Works, fine, for, me.
Previous Comments:
------------------------------------------------------------------------
[2009-10-26 23:17:59] vlad at todosv dot com
Description:
------------
Keeping it simple:
If you have PHP as a Apache's Mod you can send Last-Modified without
problems.
If you have PHP as CGI/FastCGI Last-Modified header is not sent as
intented, and which is worse, it's sent as: Last-Modified Thu, 01 Jan
1970 00:00:00 GMT.
The problem with this is that I can't do custom file caching by sending
304 header.
Reproduce code:
---------------
<?php
header('Last-Modified: mon, 26 oct 2009 18:26:27 GMT');
header('mtime: mon, 26 oct 2009 18:26:27 GMT');
print implode('<br />',headers_list());
?>
It will output the same header_list() regardless it's *CGI or as apache
mod.
It prints the following:
X-Powered-By: PHP/5.2.10-2ubuntu6
Last-Modified:lun, 26 oct 2009 18:26:27 GMT
mtime: lun, 26 oct 2009 18:26:27 GMT
But received headers are not the same.
Expected result:
----------------
As an Apache Mod:
X-Powered-By PHP/5.2.10-2ubuntu6
mtime mon, 26 oct 2009 18:26:27 GMT
Last-Modified mon, 26 oct 2009 18:26:27 GMT
Actual result:
--------------
As *GCI:
X-Powered-By PHP/5.2.10-2ubuntu6
mtime mon, 26 oct 2009 18:26:27 GMT
Last-Modified Thu, 01 Jan 1970 00:00:00 GMT
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50007&edit=1