1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-14 15:58:39 +01:00

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
This commit is contained in:
epriestley 2019-01-31 07:27:47 -08:00
parent bc61d09f55
commit b3e4743ad7

View file

@ -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