mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Implement PhutilRequest parser
Summary: If D6277 is the way to go, then this will be it's implementation. Depends on D6277 Test Plan: Keep using the site Reviewers: epriestley CC: aran, Korvin Maniphest Tasks: T3432 Differential Revision: https://secure.phabricator.com/D6278
This commit is contained in:
parent
933d45d5cf
commit
e40f0e13c5
2 changed files with 8 additions and 1 deletions
|
@ -83,7 +83,7 @@ class AphrontDefaultApplicationConfiguration
|
|||
|
||||
public function buildRequest() {
|
||||
$request = new AphrontRequest($this->getHost(), $this->getPath());
|
||||
$request->setRequestData($_GET + $_POST);
|
||||
$request->setRequestData($_POST + $_GET);
|
||||
$request->setApplicationConfiguration($this);
|
||||
return $request;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,13 @@ try {
|
|||
$host = AphrontRequest::getHTTPHeader('Host');
|
||||
$path = $_REQUEST['__path__'];
|
||||
|
||||
$parser = new PhutilQueryStringParser();
|
||||
$_GET = $parser->parseQueryString(
|
||||
isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : "");
|
||||
$_POST = $parser->parseQueryString(
|
||||
(string)file_get_contents('php://input'));
|
||||
$_REQUEST = $_POST + $_GET;
|
||||
|
||||
switch ($host) {
|
||||
default:
|
||||
$config_key = 'aphront.default-application-configuration-class';
|
||||
|
|
Loading…
Reference in a new issue