Page MenuHomePhabricator

zlib.patch

Authored By
bzimport
Nov 21 2014, 10:30 PM
Size
1 KB
Referenced Files
None
Subscribers
None

zlib.patch

Index: includes/OutputPage.php
===================================================================
--- includes/OutputPage.php (revision 47377)
+++ includes/OutputPage.php (working copy)
@@ -232,6 +232,7 @@
# Not modified
# Give a 304 response code and disable body output
wfDebug( __METHOD__ . ": NOT MODIFIED, $info\n", false );
+ ini_set('zlib.output_compression', 0);
$wgRequest->response()->header( "HTTP/1.1 304 Not Modified" );
$this->sendCacheControl();
$this->disable();
Index: includes/StreamFile.php
===================================================================
--- includes/StreamFile.php (revision 47377)
+++ includes/StreamFile.php (working copy)
@@ -48,6 +48,7 @@
$modsince = preg_replace( '/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE'] );
$sinceTime = strtotime( $modsince );
if ( $stat['mtime'] <= $sinceTime ) {
+ ini_set('zlib.output_compression', 0);
header( "HTTP/1.0 304 Not Modified" );
return;
}
Index: includes/AjaxResponse.php
===================================================================
--- includes/AjaxResponse.php (revision 47377)
+++ includes/AjaxResponse.php (working copy)
@@ -178,6 +178,7 @@
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;

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5022
Default Alt Text
zlib.patch (1 KB)

Event Timeline