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
F15483640: D21506.id51192.diff
Wed, Apr 9, 1:38 PM
F15482450: D21506.id51189.diff
Wed, Apr 9, 5:37 AM
F15481034: D21506.id51192.diff
Tue, Apr 8, 5:49 PM
F15478396: D21506.diff
Mon, Apr 7, 10:49 PM
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
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