[BUGFIX] Disable file compression for external urls in js and css includes 67/58867/3
authorBenjamin Kott <benjamin.kott@outlook.com>
Wed, 7 Nov 2018 16:45:19 +0000 (17:45 +0100)
committerJan Helke <typo3@helke.de>
Fri, 7 Dec 2018 13:11:40 +0000 (14:11 +0100)
Resolves: #53123
Releases: master, 8.7
Change-Id: I8030e434a27ae2f2c5934706eec6f64e64e31cd3
Reviewed-on: https://review.typo3.org/58867
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Willi Wehmeier <wwwehmeier@gmail.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php

index 86f1ffc..c7ed4cd 100644 (file)
@@ -494,7 +494,7 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
                                 $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 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
                                 $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 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
                             $key,
                             $ss,
                             $type,
-                            empty($jsFileConfig['disableCompression']),
+                            $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']),
                             (bool)$jsFileConfig['forceOnTop'],
                             $jsFileConfig['allWrap'],
                             (bool)$jsFileConfig['excludeFromConcatenation'],
@@ -653,7 +653,7 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
                             $key,
                             $ss,
                             $type,
-                            empty($jsFileConfig['disableCompression']),
+                            $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']),
                             (bool)$jsFileConfig['forceOnTop'],
                             $jsFileConfig['allWrap'],
                             (bool)$jsFileConfig['excludeFromConcatenation'],
@@ -697,7 +697,7 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
                         $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 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
                         $pageRenderer->addJsFooterFile(
                             $ss,
                             $type,
-                            empty($jsConfig['disableCompression']),
+                            $jsConfig['external'] ? false : empty($jsConfig['disableCompression']),
                             (bool)$jsConfig['forceOnTop'],
                             $jsConfig['allWrap'],
                             (bool)$jsConfig['excludeFromConcatenation'],
index 0bc5d65..d997077 100644 (file)
@@ -336,7 +336,7 @@ class PageGenerator
                                 $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 @@ class PageGenerator
                                 $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 @@ class PageGenerator
                             $key,
                             $ss,
                             $type,
-                            empty($jsFileConfig['disableCompression']),
+                            $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']),
                             (bool)$jsFileConfig['forceOnTop'],
                             $jsFileConfig['allWrap'],
                             (bool)$jsFileConfig['excludeFromConcatenation'],
@@ -495,7 +495,7 @@ class PageGenerator
                             $key,
                             $ss,
                             $type,
-                            empty($jsFileConfig['disableCompression']),
+                            $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']),
                             (bool)$jsFileConfig['forceOnTop'],
                             $jsFileConfig['allWrap'],
                             (bool)$jsFileConfig['excludeFromConcatenation'],
@@ -539,7 +539,7 @@ class PageGenerator
                         $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 @@ class PageGenerator
                         $pageRenderer->addJsFooterFile(
                             $ss,
                             $type,
-                            empty($jsConfig['disableCompression']),
+                            $jsConfig['external'] ? false : empty($jsConfig['disableCompression']),
                             (bool)$jsConfig['forceOnTop'],
                             $jsConfig['allWrap'],
                             (bool)$jsConfig['excludeFromConcatenation'],