Let built-in web server handle .php requests
authorAntoine Musso <hashar@free.fr>
Fri, 23 Mar 2018 10:38:26 +0000 (11:38 +0100)
committerAntoine Musso <hashar@free.fr>
Wed, 28 Mar 2018 13:36:02 +0000 (15:36 +0200)
commit830dec6d21cb815f6552f2788b5f4f7230644f01
treeeba6b17cd3016e9638486ecdcfbdadfb4114cb24
parent6f9c30c67b31b12d39f2d54b431e141869895eca
Let built-in web server handle .php requests

When using the PHP built-in webserver with maintenance/dev/start.sh,
requests made to regular files do show in the console output but
requests to .php files do not log anything in the console. It is a bit
annoying since one is left wondering whether the requests are actually
honored.

The reason is the request router maintenance/dev/includes/router.php
does a require of the PHP file and abort the router (return true). That
causes the built-in php server to not produce the access log requests.

Based on the comment note, some earlier PHP version had POST data
stripped preventing login. The related upstream bug is
https://bugs.php.net/bug.php?id=60159:

  "Router returns false, but POST is not passed to requested resource"

750eac7e41d introduced the workaround on Nov 24th 2011. PHP 5.4.0 got
released in March 2012 and refers to that bug.  The development of our
router thus must have used a development/beta version of PHP 5.4.

Since the fix made it to the PHP final release, there is no need for
workaround anymore.

Bug: T190503
Change-Id: Ia8c4f1610ea0ef5b04ea30d6e91199b8e597065b
maintenance/dev/includes/router.php