summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-25 17:46:03 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-25 21:05:10 +0200
commitfe0f281b4fdd4932bde16e84e98c0ea572d3c96e (patch)
treec3ba759e4ee9b0b22978df04e3027b47c591905b /lib
parent531c1c509c32d400f0eebfd436ac608a6b6e35a7 (diff)
downloadnextcloud-server-fe0f281b4fdd4932bde16e84e98c0ea572d3c96e.tar.gz
nextcloud-server-fe0f281b4fdd4932bde16e84e98c0ea572d3c96e.zip
Fix setting ETag header on cache miss
Diffstat (limited to 'lib')
-rw-r--r--lib/minimizer.php5
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()) {