Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/Controller/CssController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion core/Controller/JsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Template/JSCombiner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Template/SCSSCacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Controller/CssControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Controller/JsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/Template/JSCombinerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/Template/SCSSCacherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down