diff options
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 11f69c539..18f1902a9 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -607,13 +607,15 @@ function drupal_page_cache_header($cache) { header("Expires: Sun, 19 Nov 1978 05:00:00 GMT"); header("Cache-Control: must-revalidate"); - // Determine if the browser accepts gzipped data. - if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === FALSE && function_exists('gzencode')) { - // Strip the gzip header and run uncompress. - $cache->data = gzinflate(substr(substr($cache->data, 10), 0, -8)); - } - elseif (function_exists('gzencode')) { - header('Content-Encoding: gzip'); + if (variable_get('page_compression', TRUE)) { + // Determine if the browser accepts gzipped data. + if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === FALSE && function_exists('gzencode')) { + // Strip the gzip header and run uncompress. + $cache->data = gzinflate(substr(substr($cache->data, 10), 0, -8)); + } + elseif (function_exists('gzencode')) { + header('Content-Encoding: gzip'); + } } // Send the original request's headers. We send them one after |