diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php index b467d386f98c0..57197e9999e5e 100644 --- a/core/Controller/CssController.php +++ b/core/Controller/CssController.php @@ -95,7 +95,7 @@ private function getFile(ISimpleFolder $folder, $fileName, &$gzip) { if ($encoding !== null && strpos($encoding, 'gzip') !== false) { try { $gzip = true; - return $folder->getFile($fileName . '.gz'); + return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz } catch (NotFoundException $e) { // continue } diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php index 0b50abc158ad3..c7c9dea910168 100644 --- a/core/Controller/JsController.php +++ b/core/Controller/JsController.php @@ -96,7 +96,7 @@ private function getFile(ISimpleFolder $folder, $fileName, &$gzip) { if ($encoding !== null && strpos($encoding, 'gzip') !== false) { try { $gzip = true; - return $folder->getFile($fileName . '.gz'); + return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz } catch (NotFoundException $e) { // continue } diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index 0f30fb915f775..77c46a5e45e95 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -155,9 +155,9 @@ protected function cache($path, $fileName, ISimpleFolder $folder) { } try { - $gzipFile = $folder->getFile($fileName . '.gz'); + $gzipFile = $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz } catch (NotFoundException $e) { - $gzipFile = $folder->newFile($fileName . '.gz'); + $gzipFile = $folder->newFile($fileName . '.gzip'); # Safari doesn't like .gz } try { diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index df2e023250886..6e09f41a215e5 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -188,9 +188,9 @@ private function cache($path, $fileNameCSS, $fileNameSCSS, ISimpleFolder $folder // Gzip file try { - $gzipFile = $folder->getFile($fileNameCSS . '.gz'); + $gzipFile = $folder->getFile($fileNameCSS . '.gzip'); # Safari doesn't like .gz } catch (NotFoundException $e) { - $gzipFile = $folder->newFile($fileNameCSS . '.gz'); + $gzipFile = $folder->newFile($fileNameCSS . '.gzip'); # Safari doesn't like .gz } try { diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index 7fa358e056efa..30bbc12809e9b 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -121,7 +121,7 @@ public function testGetGzipFile() { ->willReturn($folder); $folder->method('getFile') - ->with('file.css.gz') + ->with('file.css.gzip') ->willReturn($gzipFile); $this->request->method('getHeader') diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 8f48a7c339059..8456ba8b6e389 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -120,7 +120,7 @@ public function testGetGzipFile() { ->willReturn($folder); $folder->method('getFile') - ->with('file.js.gz') + ->with('file.js.gzip') ->willReturn($gzipFile); $this->request->method('getHeader') diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 1e6234a062c93..89bb13338c829 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -111,7 +111,7 @@ public function testProcessUncachedFileNoAppDataFolder() { return $file; } else if ($path === 'combine.js.deps') { throw new NotFoundException(); - } else if ($path === 'combine.js.gz') { + } else if ($path === 'combine.js.gzip') { return $gzfile; } $this->fail(); @@ -148,7 +148,7 @@ public function testProcessUncachedFile() { return $file; } else if ($path === 'combine.js.deps') { throw new NotFoundException(); - } else if ($path === 'combine.js.gz') { + } else if ($path === 'combine.js.gzip') { return $gzfile; } $this->fail(); @@ -302,7 +302,7 @@ function ($filename) use ($file, $depsFile, $gzFile) { return $file; } else if ($filename === 'combine.js.deps') { return $depsFile; - } else if ($filename === 'combine.js.gz') { + } else if ($filename === 'combine.js.gzip') { return $gzFile; } $this->fail(); @@ -333,7 +333,7 @@ function ($filename) use ($file, $depsFile, $gzFile) { return $file; } else if ($filename === 'combine.js.deps') { return $depsFile; - } else if ($filename === 'combine.js.gz') { + } else if ($filename === 'combine.js.gzip') { return $gzFile; } $this->fail(); @@ -401,7 +401,7 @@ function ($filename) use ($file, $depsFile, $gzFile) { return $file; } else if ($filename === 'combine.js.deps') { return $depsFile; - } else if ($filename === 'combine.js.gz') { + } else if ($filename === 'combine.js.gzip') { return $gzFile; } $this->fail(); diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index 887fa1ed605a4..24865b9ae458d 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -81,7 +81,7 @@ public function testProcessUncachedFileNoAppDataFolder() { return $file; } else if ($path === 'styles.css.deps') { throw new NotFoundException(); - } else if ($path === 'styles.css.gz') { + } else if ($path === 'styles.css.gzip') { return $gzfile; } else { $this->fail(); @@ -110,7 +110,7 @@ public function testProcessUncachedFile() { return $file; } else if ($path === 'styles.css.deps') { throw new NotFoundException(); - } else if ($path === 'styles.css.gz') { + } else if ($path === 'styles.css.gzip') { return $gzfile; }else { $this->fail(); @@ -228,7 +228,7 @@ public function testCacheNoFile() { return $file; } else if ($fileName === 'styles.css.deps') { return $depsFile; - } else if ($fileName === 'styles.css.gz') { + } else if ($fileName === 'styles.css.gzip') { return $gzipFile; } throw new \Exception(); @@ -258,7 +258,7 @@ public function testCache() { return $file; } else if ($fileName === 'styles.css.deps') { return $depsFile; - } else if ($fileName === 'styles.css.gz') { + } else if ($fileName === 'styles.css.gzip') { return $gzipFile; } throw new \Exception(); @@ -288,7 +288,7 @@ public function testCacheSuccess() { return $file; } else if ($fileName === 'styles-success.css.deps') { return $depsFile; - } else if ($fileName === 'styles-success.css.gz') { + } else if ($fileName === 'styles-success.css.gzip') { return $gzipFile; } throw new \Exception();