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:
Petr Škoda
2013-12-27 11:06:18 +08:00
parent 2803f3c1b5
commit b19d75a264
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -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
View File
@@ -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
View File
@@ -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);
}
}