#39984 [Opn->Fbk]: Response header sent as 302 despite being set to 301
| From: | tony2001@php.net | Date: | Fri, 29 Dec 2006 18:03:31 +0000 |
| Subject: | #39984 [Opn->Fbk]: Response header sent as 302 despite being set to 301 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107010@lists.php.net to get a copy of this message | ||
ID: 39984
Updated by: tony2001@php.net
Reported By: marc dot bau at gmx dot net
-Status: Open
+Status: Feedback
Bug Type: IIS related
Operating System: WinXP
PHP Version: 5.2.0
New Comment:
This is why I stated I was using Apache.
Please make sure IIS does not translate 301 to 302.
Previous Comments:
------------------------------------------------------------------------
[2006-12-29 17:59:52] marc dot bau at gmx dot net
This is why is selected "IIS related". I cannot repro this with Apache,
too. But under IIS it is broken!
------------------------------------------------------------------------
[2006-12-29 17:30:36] tony2001@php.net
Cannot reproduce with Apache.
HTTP/1.1 301
Date: Fri, 29 Dec 2006 17:29:55 GMT
Server: Apache/1.3.29 (Unix)
X-Powered-By: PHP/5.2.1RC2-dev
Location: http://example.com
Connection: close
Content-Type: text/html
------------------------------------------------------------------------
[2006-12-29 14:37:05] marc dot bau at gmx dot net
Description:
------------
This code should return a response header of 301, but sends a response
header of 302.
I have tested this with PHP 5.1 and 5.2 on IIS with PHP-CGI.
Reproduce code:
---------------
<?php
header("Location: http://example.com", true, 301);
?>
Expected result:
----------------
HTTP Status Code 301
Actual result:
--------------
HTTP Status Code 302
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39984&edit=1