diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-06-25 17:46:03 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-06-25 21:05:10 +0200 |
commit | fe0f281b4fdd4932bde16e84e98c0ea572d3c96e (patch) | |
tree | c3ba759e4ee9b0b22978df04e3027b47c591905b /lib | |
parent | 531c1c509c32d400f0eebfd436ac608a6b6e35a7 (diff) | |
download | nextcloud-server-fe0f281b4fdd4932bde16e84e98c0ea572d3c96e.tar.gz nextcloud-server-fe0f281b4fdd4932bde16e84e98c0ea572d3c96e.zip |
Fix setting ETag header on cache miss
Diffstat (limited to 'lib')
-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()) { |