From b3e4743ad7674711729778e5c2f8c173784dcd94 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 31 Jan 2019 07:27:47 -0800 Subject: [PATCH] Read POST data sightly earlier in request startup Summary: On instances, the "SiteSource" (for site config) pretty much copy-pastes the "read POST data" block because it needs to make some decisions based on POST data when handling inbound mail webhooks. Move the upstream read a little earlier so we can get rid of this. Now that this step is separated and must happen before the profiler, there's no reason not to do it earlier. Test Plan: POSTed some data across pages without issue, will remove duplicate code in upcoming change. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20073 --- src/aphront/configuration/AphrontApplicationConfiguration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aphront/configuration/AphrontApplicationConfiguration.php b/src/aphront/configuration/AphrontApplicationConfiguration.php index 365ba8f94a..8d36bbc880 100644 --- a/src/aphront/configuration/AphrontApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontApplicationConfiguration.php @@ -109,6 +109,8 @@ final class AphrontApplicationConfiguration PhabricatorStartup::beginStartupPhase('env.init'); + self::readHTTPPOSTData(); + try { PhabricatorEnv::initializeWebEnvironment(); $database_exception = null; @@ -152,8 +154,6 @@ final class AphrontApplicationConfiguration 'M' => idx($_SERVER, 'REQUEST_METHOD', '-'), )); - self::readHTTPPOSTData(); - DarkConsoleXHProfPluginAPI::hookProfiler(); // We just activated the profiler, so we don't need to keep track of