From:             
Operating system: Any
PHP version:      5.3.6
Package:          Apache2 related
Bug Type:         Bug
Bug description:Additional headers are ignored when returning HTTP status 304

Description:
------------
When HTTP status 304 is set, Apache appears to ignore any other headers.
X-
Powered-By is also missing, which was the first hint that something was up
in 
either the SAPI or Apache.

I'm not fully sure this is a PHP bug, or an Apache bug though, so feel free
to 
close it if I put it in the wrong space.

The practical use-case I have for this is the so-called CORS headers. When
I do a 
cross-domain request within firefox, and CORS headers have expired firefox

requires them to be set, even for the 304 response. Since they get
stripped, 
firefox just throws an error. 

Test script:
---------------
header('HTTP/1.1 304 Not Modified')
header('X-Foo: Bar');

Expected result:
----------------
The X-Foo header returned

Actual result:
--------------
All custom headers are ignored

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

Reply via email to