From 72345298ec7cbe3f354d64c32fee6cef61223bda Mon Sep 17 00:00:00 2001 From: Susanne Moog <look@susi.dev> Date: Mon, 23 Mar 2020 21:06:36 +0100 Subject: [PATCH] [BUGFIX] Do not compress inline CSS Gzip encoding inline CSS does not work and we should not do that. Therefor setting `inline = 1` now also implies `disableCompression` (same way as it is done for concatenation). Resolves: #90820 Releases: master, 9.5 Change-Id: I85c70bba9dd850fe9b03086dc6c51f7064c60ba7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63884 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Timo Poppinga <timo.poppinga@zdrei.com> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Timo Poppinga <timo.poppinga@zdrei.com> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> --- typo3/sysext/frontend/Classes/Http/RequestHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php index f103cd2cb43b..7dd8d4703d54 100644 --- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php +++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php @@ -458,7 +458,7 @@ class RequestHandler implements RequestHandlerInterface $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', $cssFileConfig['media'] ?: 'all', $cssFileConfig['title'] ?: '', - $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), + $cssFileConfig['external'] || (bool)$cssFileConfig['inline'] ? false : empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], $cssFileConfig['allWrap'], (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], @@ -501,7 +501,7 @@ class RequestHandler implements RequestHandlerInterface $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', $cssFileConfig['media'] ?: 'all', $cssFileConfig['title'] ?: '', - $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), + $cssFileConfig['external'] || (bool)$cssFileConfig['inline'] ? false : empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], $cssFileConfig['allWrap'], (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], -- GitLab