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
Unknown Object (File)
Tue, Mar 26, 12:53 AM
Unknown Object (File)
Thu, Mar 14, 12:35 PM
Unknown Object (File)
Feb 23 2024, 4:26 AM
Unknown Object (File)
Feb 4 2024, 12:35 AM
Unknown Object (File)
Jan 5 2024, 1:16 PM
Unknown Object (File)
Dec 19 2023, 9:09 AM
Unknown Object (File)
Dec 16 2023, 12:03 AM
Unknown Object (File)
Nov 30 2023, 2:15 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