ID: 49932
Updated by: [email protected]
Reported By: sjoerd-php at linuxonly dot nl
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: Linux
PHP Version: 5.2.11
New Comment:
IIRC, you can only override headers set by PHP itself. I'd guess that
header is set by Apache..? You propably should turn off Multiviews..or
whatever that was again. What I'm guessing here is that the header is
injected after PHP code is run.
Previous Comments:
------------------------------------------------------------------------
[2009-10-20 11:43:06] sjoerd-php at linuxonly dot nl
Description:
------------
If you access a script by a name other than its filename, it generates
a Content-Location HTTP header. For example, if you request '/a' instead
of '/a.php', the Content-Location header contains 'a.php'.
If you try to override the Content-Location header in the script, like
in the code example below, the response contains two Content-Location
headers.
Reproduce code:
---------------
<?php
header('Content-Location: http://www.example.org/a.php');
?>
Expected result:
----------------
One Content-Location header in result:
Content-Location: http://www.example.org/a.php
Actual result:
--------------
Two Content-Location headers in result:
Content-Location: a.php
Content-Location: http://www.example.org/a.php
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49932&edit=1