]> source.dussan.org Git - nextcloud-server.git/commitdiff
Better place to check caching headers
authorBart Visscher <bartv@thisnet.nl>
Fri, 11 May 2012 22:31:42 +0000 (00:31 +0200)
committerBart Visscher <bartv@thisnet.nl>
Wed, 16 May 2012 16:52:40 +0000 (18:52 +0200)
lib/base.php

index ddf410c3163417174deb54efdb61191462b0ec0f..52a497e076d0bef8d8d2eab356e837f9ffafb2e0 100644 (file)
@@ -289,12 +289,12 @@ class OC{
                                $appswebroot = (string) OC::$APPSWEBROOT;
                                $webroot = (string) OC::$WEBROOT;
                                $filepath = OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE;
-                               $cssfile = file_get_contents($filepath);
-                               $cssfile = str_replace('%appswebroot%', $appswebroot, $cssfile);
-                               $cssfile = str_replace('%webroot%', $webroot, $cssfile);
                                header('Content-Type: text/css');
                                OC_Response::enableCaching();
                                OC_Response::setLastModifiedHeader(filemtime($filepath));
+                               $cssfile = file_get_contents($filepath);
+                               $cssfile = str_replace('%appswebroot%', $appswebroot, $cssfile);
+                               $cssfile = str_replace('%webroot%', $webroot, $cssfile);
                                OC_Response::setETagHeader(md5($cssfile));
                                header('Content-Length: '.strlen($cssfile));
                                echo $cssfile;