#33661 [Opn->Fbk]: Header and _POST problem

From: Date: Tue, 12 Jul 2005 13:39:00 +0000
Subject: #33661 [Opn->Fbk]: Header and _POST problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81740@lists.php.net to get a copy of this message
 ID:               33661
 Updated by:       sniper@php.net
 Reported By:      f dot hardy at origami-systems dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         HTTP related
 Operating System: freebsd 4.10
 PHP Version:      5.0.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-07-12 15:33:03] f dot hardy at origami-systems dot com

Description:
------------
I have a problem with $_POST and the header() function.
If I make a test on $_POST, my 404 http header is replaced by a 2OO OK
header.
If I make a test on $_GET (with a get action in html form), or an
another variable, I receive the 404 http header.



Reproduce code:
---------------
<?php
if (isset($_POST['test']) == true)
{
	header("HTTP/1.1 404 Not Found", true);
	die();
}
else
{
?>
<form method="post">
	<input type="text" name="test" value="" />
	<input type="submit" name="modify" value="Modify" />
</form>
<?php
}
?>

Expected result:
----------------
A 404 HTTP header in response.

Actual result:
--------------
A 200 OK HTTP header in response.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33661&edit=1


Thread (8 messages)

« previous php.bugs (#81740) next »