only in patch2: unchanged: --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2268,8 +2268,8 @@ function drupal_clear_js_cache() { */ function drupal_page_set_cache(Response $response, Request $request) { // Check if the current page may be compressed. - if (\Drupal::config('system.performance')->get('response.gzip') && - !$response->headers->get('Content-Encoding') && extension_loaded('zlib')) { + if (extension_loaded('zlib') && !$response->headers->get('Content-Encoding') && + \Drupal::config('system.performance')->get('response.gzip')) { $content = $response->getContent(); if ($content) {