#39984 [NEW]: Response header sent as 302 despite being set to 301

From: Date: Fri, 29 Dec 2006 14:37:05 +0000
Subject: #39984 [NEW]: Response header sent as 302 despite being set to 301
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106995@lists.php.net to get a copy of this message
From:             marc dot bau at gmx dot net
Operating system: WinXP
PHP version:      5.2.0
PHP Bug Type:     IIS related
Bug description:  Response header sent as 302 despite being set to 301

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


Thread (29 messages)

« previous php.bugs (#106995) next »