Edit report at https://bugs.php.net/bug.php?id=60159&edit=1
ID: 60159 Updated by: larue...@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] larue...@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