Bug #60159 [Opn->Csd]: Router returns false, but POST is not passed to requested resource
| From: | laruence@php.net | Date: | Tue, 15 Nov 2011 03:16:49 +0000 |
| Subject: | Bug #60159 [Opn->Csd]: Router returns false, but POST is not passed to requested resource | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165144@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60159&edit=1
ID: 60159
Updated by: laruence@php.net
Reported by: adam at sixohthree dot com
Summary: Router returns false, but POST is not passed to
requested resource
-Status: Open
+Status: Closed
Type: Bug
Package: Built-in web server
Operating System: Mac OS X 10.6.8
PHP Version: 5.4.0beta2
-Assigned To:
+Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-11-15 03:15:10] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=319224
Log: Fixed bug #60159 (Router returns false, but POST is not passed to requested
resource) and bug #55759 (mem leak when use built-in server)
------------------------------------------------------------------------
[2011-10-28 16:21:13] adam at sixohthree dot com
Description:
------------
If the built-in web server's router returns false, and the requested resource is a
PHP file, this PHP file will be interpreted but will not receive the same POST
data as the router. I would expect the requested resource to receive POST, for
cases when the router is only intended to handle files that do not exist (e.g.
RewriteCond's !-f). WordPress requires this behavior, though I'm sure it's not
alone.
Test script:
---------------
router.php:
<?php return false;
index.php:
<?php var_dump( $_POST );
Expected result:
----------------
# php -S localhost:8080 router.php
# curl -d foo=bar http://localhost:8080/
array(1) {
["foo"]=>
string(3) "bar"
}
# php -S localhost:8080
# curl -d foo=bar http://localhost:8080/
array(1) {
["foo"]=>
string(3) "bar"
}
Actual result:
--------------
# php -S localhost:8080 router.php
# curl -d foo=bar http://localhost:8080/
array(0) {
}
# php -S localhost:8080
# curl -d foo=bar http://localhost:8080/
array(1) {
["foo"]=>
string(3) "bar"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60159&edit=1