Page MenuHomePhabricator

Fix reading of the request path when running the PHP builtin webserver
ClosedPublic

Authored by epriestley on Jan 11 2021, 6:34 PM.
Tags
None
Referenced Files
F18108961: D21506.id51192.diff
Mon, Aug 11, 10:46 AM
F18104198: D21506.id.diff
Sun, Aug 10, 10:33 AM
F18102298: D21506.diff
Sat, Aug 9, 7:53 PM
F18101311: D21506.id.diff
Sat, Aug 9, 12:26 PM
F17953048: D21506.id51189.diff
Fri, Aug 1, 2:43 AM
F17951108: D21506.id51192.diff
Fri, Aug 1, 12:59 AM
F17948494: D21506.id.diff
Thu, Jul 31, 9:14 PM
F17936124: D21506.diff
Wed, Jul 30, 11:58 PM
Subscribers
None

Details

Summary

Ref T13575. Since PHP builtin webserver support was added, the pathway for parsing request parameters became more complex. We now rebuild "$_REQUEST" later, and this rebuild will destroy any mutations made to it here, so the assignment to __path__ is lost.

Instead of "validating" the request path, make this method "read" the request path and store it explicitly, so it will survive any later request mutations.

Test Plan
  • Submitted any POST form while running Phabricator under the builtin PHP webserver. Old behavior was an error when accessing __path__; new behavior is a working application.
  • Loaded normal pages, etc.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable