MDL-43402 let's try to remove @ silencing from gzip related code
If anything goes wrong on multiple production sites we can just revert this commit, that is why it is separete from the rest of zlib stuff.
This commit is contained in:
@@ -142,14 +142,14 @@ function min_enable_zlib_compression() {
|
||||
|
||||
// zlib.output_compression is preferred over ob_gzhandler()
|
||||
if (!empty($_SERVER['HTTP_USER_AGENT']) and strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) {
|
||||
@ini_set('zlib.output_compression', 'Off');
|
||||
ini_set('zlib.output_compression', 'Off');
|
||||
if (function_exists('apache_setenv')) {
|
||||
@apache_setenv('no-gzip', 1);
|
||||
apache_setenv('no-gzip', 1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ini_set('output_handler', '');
|
||||
ini_set('output_handler', '');
|
||||
|
||||
/*
|
||||
* docs clearly say 'on' means enable and number means size of buffer,
|
||||
@@ -157,7 +157,7 @@ function min_enable_zlib_compression() {
|
||||
* 1 probably sets chunk size to 4096. our CSS and JS scripts are much bigger,
|
||||
* so let's try some bigger sizes.
|
||||
*/
|
||||
@ini_set('zlib.output_compression', 65536);
|
||||
ini_set('zlib.output_compression', 65536);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -2672,7 +2672,7 @@ function fulldelete($location) {
|
||||
*/
|
||||
function byteserving_send_file($handle, $mimetype, $ranges, $filesize) {
|
||||
// better turn off any kind of compression and buffering
|
||||
@ini_set('zlib.output_compression', 'Off');
|
||||
ini_set('zlib.output_compression', 'Off');
|
||||
|
||||
$chunksize = 1*(1024*1024); // 1MB chunks - must be less than 2MB!
|
||||
if ($handle === false) {
|
||||
|
||||
+2
-2
@@ -985,9 +985,9 @@ if (PHPUNIT_TEST) {
|
||||
|
||||
// // try to detect IE6 and prevent gzip because it is extremely buggy browser
|
||||
if (!empty($_SERVER['HTTP_USER_AGENT']) and strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) {
|
||||
@ini_set('zlib.output_compression', 'Off');
|
||||
ini_set('zlib.output_compression', 'Off');
|
||||
if (function_exists('apache_setenv')) {
|
||||
@apache_setenv('no-gzip', 1);
|
||||
apache_setenv('no-gzip', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user