diff --git a/core/includes/common.inc b/core/includes/common.inc index b97cc5e..358577b 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -3134,7 +3134,7 @@ function drupal_page_set_cache(Response $response, Request $request) { if (drupal_page_is_cacheable()) { // Check if the current page may be compressed. - $page_compressed = \Drupal::config('system.performance')->get('response.gzip') && extension_loaded('zlib'); + $page_compressed = extension_loaded('zlib') && \Drupal::config('system.performance')->get('response.gzip'); $cache = (object) array( 'cid' => drupal_page_cache_get_cid($request), diff --git a/core/lib/Drupal/Core/Asset/AssetDumper.php b/core/lib/Drupal/Core/Asset/AssetDumper.php index 7ff85ed..3c5bb28 100644 --- a/core/lib/Drupal/Core/Asset/AssetDumper.php +++ b/core/lib/Drupal/Core/Asset/AssetDumper.php @@ -41,7 +41,7 @@ public function dump($data, $file_extension) { // file) in generating the file anyway. Sites on servers where rewrite rules // aren't working can set css.gzip to FALSE in order to skip // generating a file that won't be used. - if (\Drupal::config('system.performance')->get($file_extension . '.gzip') && extension_loaded('zlib')) { + if ( extension_loaded('zlib') && \Drupal::config('system.performance')->get($file_extension . '.gzip') ) { if (!file_exists($uri . '.gz') && !file_unmanaged_save_data(gzencode($data, 9, FORCE_GZIP), $uri . '.gz', FILE_EXISTS_REPLACE)) { return FALSE; } diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 616f260..ba168b6 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -615,21 +615,6 @@ # $conf['anonymous'] = 'Visitor'; /** - * CSS/JS aggregated file gzip compression: - * - * By default, when CSS or JS aggregation and clean URLs are enabled Drupal will - * store a gzip compressed (.gz) copy of the aggregated files. If this file is - * available then rewrite rules in the default .htaccess file will serve these - * files to browsers that accept gzip encoded content. This allows pages to load - * faster for these users and has minimal impact on server load. If you are - * using a webserver other than Apache httpd, or a caching reverse proxy that is - * configured to cache and compress these files itself you may want to uncomment - * one or both of the below lines, which will prevent gzip files being stored. - */ -# $conf['system.performance']['css']['gzip'] = FALSE; -# $conf['system.performance']['js']['gzip'] = FALSE; - -/** * Fast 404 pages: * * Drupal can generate fully themed 404 pages. However, some of these responses