X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/mediawiki.git/blobdiff_plain/c33ba33ef28344d64266b8b588460a301750fad5..0b017e2f2e5b181e32b55055b26774804dc47716:/includes/AjaxResponse.php diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index 8fa08539..26b6f443 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -1,11 +1,18 @@ disable() */ private $mDisabled; /** Date for the HTTP header Last-modified */ @@ -38,7 +45,7 @@ class AjaxResponse { $this->mText = ''; $this->mResponseCode = '200 OK'; $this->mLastModified = false; - $this->mContentType= 'text/html; charset=utf-8'; + $this->mContentType= 'application/x-wiki'; if ( $text ) { $this->addText( $text ); @@ -99,7 +106,7 @@ class AjaxResponse { if ( $this->mCacheDuration ) { - # If squid caches are configured, tell them to cache the response, + # If squid caches are configured, tell them to cache the response, # and tell the client to always check with the squid. Otherwise, # tell the client to use a cached copy, without a way to purge it. @@ -171,6 +178,7 @@ class AjaxResponse { wfDebug( "$fname: -- client send If-Modified-Since: " . $modsince . "\n", false ); wfDebug( "$fname: -- we might send Last-Modified : $lastmod\n", false ); if( ($ismodsince >= $timestamp ) && $wgUser->validateCache( $ismodsince ) && $ismodsince >= $wgCacheEpoch ) { + ini_set('zlib.output_compression', 0); $this->setResponseCode( "304 Not Modified" ); $this->disable(); $this->mLastModified = $lastmod; @@ -220,4 +228,3 @@ class AjaxResponse { return true; } } -