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
F15466780: D21506.id.diff
Thu, Apr 3, 9:45 AM
F15465423: D21506.diff
Wed, Apr 2, 6:30 PM
F15451416: D21506.id51192.diff
Fri, Mar 28, 9:58 PM
F15428647: D21506.id.diff
Sun, Mar 23, 9:28 PM
F15415940: D21506.diff
Thu, Mar 20, 8:30 AM
F15411944: D21506.id51192.diff
Wed, Mar 19, 10:27 AM
F15285777: D21506.diff
Mar 4 2025, 3:58 PM
Unknown Object (File)
Feb 23 2025, 1:27 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
Branch
php1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25002
Build 34493: Run Core Tests
Build 34492: arc lint + arc unit