From 8306763fafd4afa99fe4ca1c17f0c076ee93b54c Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Wed, 7 Nov 2018 17:45:19 +0100 Subject: [PATCH] [BUGFIX] Disable file compression for external urls in js and css includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: #53123 Releases: master, 8.7 Change-Id: I8030e434a27ae2f2c5934706eec6f64e64e31cd3 Reviewed-on: https://review.typo3.org/58867 Tested-by: TYPO3com Reviewed-by: Anja Leichsenring Tested-by: Anja Leichsenring Reviewed-by: Josef Glatz Reviewed-by: Daniel Goerz Reviewed-by: Willi Wehmeier Reviewed-by: Jörg Bösche Reviewed-by: Jan Helke Tested-by: Jan Helke --- .../sysext/frontend/Classes/Http/RequestHandler.php | 12 ++++++------ typo3/sysext/frontend/Classes/Page/PageGenerator.php | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php index 86f1ffc1ead3..c7ed4cd2c613 100644 --- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php +++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php @@ -494,7 +494,7 @@ protected function generatePageContentWithHeader(TypoScriptFrontendController $c $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', $cssFileConfig['media'] ?: 'all', $cssFileConfig['title'] ?: '', - empty($cssFileConfig['disableCompression']), + $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], $cssFileConfig['allWrap'], (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], @@ -536,7 +536,7 @@ protected function generatePageContentWithHeader(TypoScriptFrontendController $c $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', $cssFileConfig['media'] ?: 'all', $cssFileConfig['title'] ?: '', - empty($cssFileConfig['disableCompression']), + $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], $cssFileConfig['allWrap'], (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], @@ -609,7 +609,7 @@ protected function generatePageContentWithHeader(TypoScriptFrontendController $c $key, $ss, $type, - empty($jsFileConfig['disableCompression']), + $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']), (bool)$jsFileConfig['forceOnTop'], $jsFileConfig['allWrap'], (bool)$jsFileConfig['excludeFromConcatenation'], @@ -653,7 +653,7 @@ protected function generatePageContentWithHeader(TypoScriptFrontendController $c $key, $ss, $type, - empty($jsFileConfig['disableCompression']), + $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']), (bool)$jsFileConfig['forceOnTop'], $jsFileConfig['allWrap'], (bool)$jsFileConfig['excludeFromConcatenation'], @@ -697,7 +697,7 @@ protected function generatePageContentWithHeader(TypoScriptFrontendController $c $pageRenderer->addJsFile( $ss, $type, - empty($jsConfig['disableCompression']), + $jsConfig['external'] ? false : empty($jsConfig['disableCompression']), (bool)$jsConfig['forceOnTop'], $jsConfig['allWrap'], (bool)$jsConfig['excludeFromConcatenation'], @@ -740,7 +740,7 @@ protected function generatePageContentWithHeader(TypoScriptFrontendController $c $pageRenderer->addJsFooterFile( $ss, $type, - empty($jsConfig['disableCompression']), + $jsConfig['external'] ? false : empty($jsConfig['disableCompression']), (bool)$jsConfig['forceOnTop'], $jsConfig['allWrap'], (bool)$jsConfig['excludeFromConcatenation'], diff --git a/typo3/sysext/frontend/Classes/Page/PageGenerator.php b/typo3/sysext/frontend/Classes/Page/PageGenerator.php index 0bc5d659b1a8..d997077ab299 100644 --- a/typo3/sysext/frontend/Classes/Page/PageGenerator.php +++ b/typo3/sysext/frontend/Classes/Page/PageGenerator.php @@ -336,7 +336,7 @@ public static function renderContentWithHeader($pageContent) $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', $cssFileConfig['media'] ?: 'all', $cssFileConfig['title'] ?: '', - empty($cssFileConfig['disableCompression']), + $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], $cssFileConfig['allWrap'], (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], @@ -378,7 +378,7 @@ public static function renderContentWithHeader($pageContent) $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', $cssFileConfig['media'] ?: 'all', $cssFileConfig['title'] ?: '', - empty($cssFileConfig['disableCompression']), + $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], $cssFileConfig['allWrap'], (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], @@ -451,7 +451,7 @@ public static function renderContentWithHeader($pageContent) $key, $ss, $type, - empty($jsFileConfig['disableCompression']), + $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']), (bool)$jsFileConfig['forceOnTop'], $jsFileConfig['allWrap'], (bool)$jsFileConfig['excludeFromConcatenation'], @@ -495,7 +495,7 @@ public static function renderContentWithHeader($pageContent) $key, $ss, $type, - empty($jsFileConfig['disableCompression']), + $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']), (bool)$jsFileConfig['forceOnTop'], $jsFileConfig['allWrap'], (bool)$jsFileConfig['excludeFromConcatenation'], @@ -539,7 +539,7 @@ public static function renderContentWithHeader($pageContent) $pageRenderer->addJsFile( $ss, $type, - empty($jsConfig['disableCompression']), + $jsConfig['external'] ? false : empty($jsConfig['disableCompression']), (bool)$jsConfig['forceOnTop'], $jsConfig['allWrap'], (bool)$jsConfig['excludeFromConcatenation'], @@ -582,7 +582,7 @@ public static function renderContentWithHeader($pageContent) $pageRenderer->addJsFooterFile( $ss, $type, - empty($jsConfig['disableCompression']), + $jsConfig['external'] ? false : empty($jsConfig['disableCompression']), (bool)$jsConfig['forceOnTop'], $jsConfig['allWrap'], (bool)$jsConfig['excludeFromConcatenation'],