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
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
F17755177: D21506.diff
Tue, Jul 22, 11:59 AM
F17650877: D21506.id51189.diff
Sat, Jul 12, 5:03 AM
Unknown Object (File)
Jul 6 2025, 12:57 PM
Unknown Object (File)
Jun 19 2025, 2:51 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