Implement PhutilRequest parser #2
Summary: D6278 kind of got closed and commited, this is the actual direction. Ref T3432 Depends on D6277 Test Plan: Keep using the site Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin, mbishopim3 Maniphest Tasks: T3432 Differential Revision: https://secure.phabricator.com/D6283
This commit is contained in:
@@ -81,10 +81,27 @@ class AphrontDefaultApplicationConfiguration
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @phutil-external-symbol class PhabricatorStartup
|
||||
*/
|
||||
public function buildRequest() {
|
||||
$parser = new PhutilQueryStringParser();
|
||||
$data = array();
|
||||
|
||||
$raw_input = PhabricatorStartup::getRawInput();
|
||||
if (strlen($raw_input)) {
|
||||
$data += $parser->parseQueryString($raw_input);
|
||||
} else if ($_POST) {
|
||||
$data += $_POST;
|
||||
}
|
||||
|
||||
$data += $parser->parseQueryString(
|
||||
isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : "");
|
||||
|
||||
$request = new AphrontRequest($this->getHost(), $this->getPath());
|
||||
$request->setRequestData($_POST + $_GET);
|
||||
$request->setRequestData($data);
|
||||
$request->setApplicationConfiguration($this);
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user