Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/configuration/AphrontApplicationConfiguration.php
Context not available. | |||||
private static function writeResponse( | private static function writeResponse( | ||||
AphrontHTTPSink $sink, | AphrontHTTPSink $sink, | ||||
AphrontResponse $response) { | AphrontResponse $response) { | ||||
var_dump($response); | |||||
$unexpected_output = PhabricatorStartup::endOutputCapture(); | $unexpected_output = PhabricatorStartup::endOutputCapture(); | ||||
//var_dump($unexpected_output); | |||||
if ($unexpected_output) { | if ($unexpected_output) { | ||||
$unexpected_output = pht( | $unexpected_output = pht( | ||||
"Unexpected output:\n\n%s", | "Unexpected output:\n\n%s", | ||||
Context not available. | |||||
// NOTE: We only do this for GET, since redirects switch to GET and drop | // NOTE: We only do this for GET, since redirects switch to GET and drop | ||||
// data like POST parameters. | // data like POST parameters. | ||||
if (!preg_match('@/$@', $path) && $request->isHTTPGet()) { | if (!@preg_match('@/$@', $path) && $request->isHTTPGet()) { | ||||
$result = $this->routePath($maps, $path.'/'); | $result = $this->routePath($maps, $path.'/'); | ||||
if ($result) { | if ($result) { | ||||
$target_uri = $request->getAbsoluteRequestURI(); | $target_uri = $request->getAbsoluteRequestURI(); | ||||
Context not available. | |||||
$raw_input = PhabricatorStartup::getRawInput(); | $raw_input = PhabricatorStartup::getRawInput(); | ||||
$parser = new PhutilQueryStringParser(); | $parser = new PhutilQueryStringParser(); | ||||
if (strlen($raw_input)) { | if (@strlen($raw_input)) { | ||||
$content_type = idx($_SERVER, 'CONTENT_TYPE'); | $content_type = idx($_SERVER, 'CONTENT_TYPE'); | ||||
$is_multipart = preg_match('@^multipart/form-data@i', $content_type); | $is_multipart = @preg_match('@^multipart/form-data@i', $content_type); | ||||
if ($is_multipart) { | if ($is_multipart) { | ||||
$multipart_parser = id(new AphrontMultipartParser()) | $multipart_parser = id(new AphrontMultipartParser()) | ||||
->setContentType($content_type); | ->setContentType($content_type); | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0