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
F13088323: D21506.diff
Thu, Apr 25, 1:23 AM
Unknown Object (File)
Wed, Apr 24, 2:11 AM
Unknown Object (File)
Tue, Apr 23, 6:58 PM
Unknown Object (File)
Sat, Apr 20, 5:29 PM
Unknown Object (File)
Thu, Apr 18, 7:58 AM
Unknown Object (File)
Mar 26 2024, 12:53 AM
Unknown Object (File)
Mar 14 2024, 12:35 PM
Unknown Object (File)
Feb 23 2024, 4:26 AM
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