From:             vlad at todosv dot com
Operating system: Any, but tested in Ubuntu
PHP version:      5.2.11
PHP Bug Type:     CGI related
Bug description:  PHP working as FastCGI can't send Last-Modified header

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 bug report at http://bugs.php.net/?id=50007&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50007&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50007&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50007&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50007&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50007&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50007&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50007&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50007&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50007&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50007&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50007&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50007&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50007&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50007&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50007&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50007&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50007&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50007&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50007&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50007&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50007&r=mysqlcfg

Reply via email to