#49932 [Opn->Fbk]: Content-Location header is not overwritten

From: Date: Thu, 22 Oct 2009 13:44:09 +0000
Subject: #49932 [Opn->Fbk]: Content-Location header is not overwritten
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-143793@lists.php.net to get a copy of this message
ID: 49932 Updated by: jani@php.net 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

« previous php.bugs (#143793) next »