wiki.techinc.nl/load.php
Tim Starling 9f4eb79c2e Reapply Content-Length deferred updates patches
* Revert "Disable DEFER_SET_LENGTH_AND_FLUSH headers to avoid HTTP
  errors"
* Reapply "Avoid HTTP protocol errors when fastcgi_finish_request() is
  unavailable"
* Reapply "Move logDataPageOutputOnly() call to
  outputResponsePayload()"

This reverts commit 0393ddbb2a.
This reverts commit 89065a22aa.
This reverts commit e70757f58b.

Change-Id: I8a362a80bb1aa147192218a37df34aadba34fb2e
2021-04-08 09:25:56 +00:00

59 lines
2 KiB
PHP

<?php
/**
* The web entry point for ResourceLoader, which serves static CSS/JavaScript
* via ResourceLoaderModule subclasses.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup entrypoint
* @ingroup ResourceLoader
* @author Roan Kattouw
* @author Trevor Parscal
*/
use MediaWiki\MediaWikiServices;
// This endpoint is supposed to be independent of request cookies and other
// details of the session. Enforce this constraint with respect to session use.
define( 'MW_NO_SESSION', 1 );
define( 'MW_ENTRY_POINT', 'load' );
require __DIR__ . '/includes/WebStart.php';
wfLoadMain();
function wfLoadMain() {
global $wgRequest;
// Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
// writes when getting database connections for ResourceLoader. (T192611)
MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->disableChronologyProtection();
$resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
$context = new ResourceLoaderContext( $resourceLoader, $wgRequest );
// Respond to ResourceLoader request
$resourceLoader->respond( $context );
// Append any visible profiling data in a manner appropriate for the Content-Type
Profiler::instance()->setAllowOutput();
Profiler::instance()->logDataPageOutputOnly();
$mediawiki = new MediaWiki();
$mediawiki->doPostOutputShutdown();
}