Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5464
zlib.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:30 PM
2014-11-21 22:30:30 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
zlib.patch
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5022
Default Alt Text
zlib.patch (1 KB)
Attached To
Mode
T19537: Turn off zlib.output_compression for 304
Attached
Detach File
Event Timeline
Log In to Comment