Merge "Add fastcgi_finish_request where appropriate"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 3 Jan 2014 16:06:47 +0000 (16:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 3 Jan 2014 16:06:47 +0000 (16:06 +0000)
api.php
includes/Wiki.php

diff --git a/api.php b/api.php
index 51bb2ad..0d2312a 100644 (file)
--- a/api.php
+++ b/api.php
@@ -75,12 +75,17 @@ wfRunHooks( 'ApiBeforeMain', array( &$processor ) );
 // Process data & print results
 $processor->execute();
 
+if ( function_exists( 'fastcgi_finish_request' ) ) {
+       fastcgi_finish_request();
+}
+
 // Execute any deferred updates
 DeferredUpdates::doUpdates();
 
 // Log what the user did, for book-keeping purposes.
 $endtime = microtime( true );
 wfProfileOut( 'api.php' );
+
 wfLogProfilingData();
 
 // Log the request
index 1bb9c40..fd7898f 100644 (file)
@@ -458,6 +458,9 @@ class MediaWiki {
                try {
                        $this->checkMaxLag();
                        $this->main();
+                       if ( function_exists( 'fastcgi_finish_request' ) ) {
+                               fastcgi_finish_request();
+                       }
                        $this->restInPeace();
                } catch ( Exception $e ) {
                        MWExceptionHandler::handle( $e );