diff options
-rw-r--r-- | lib/minimizer.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/minimizer.php b/lib/minimizer.php index 2650c579c1d..3bf5ff9980b 100644 --- a/lib/minimizer.php +++ b/lib/minimizer.php @@ -25,12 +25,15 @@ abstract class OC_Minimizer { $cache = OC_Cache::getGlobalCache(); if (!OC_Request::isNoCache() && (!defined('DEBUG') || !DEBUG)){ $gzout = $cache->get($cache_key.'.gz'); - OC_Response::setETagHeader(md5($gzout)); + if ($gzout) { + OC_Response::setETagHeader(md5($gzout)); + } } if (!$gzout) { $out = $this->minimizeFiles($files); $gzout = gzencode($out); + OC_Response::setETagHeader(md5($gzout)); $cache->set($cache_key.'.gz', $gzout); } if ($encoding = OC_Request::acceptGZip()) { |