diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-05-12 00:31:42 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-16 18:52:40 +0200 |
commit | 5d72681d10527c7719d8d296657dc3127b7f379d (patch) | |
tree | 01f7d2b71976cb6c06a205a02d030b77dd2f69d0 /lib/base.php | |
parent | ab18a0bfe8a470de3ea7298e1024416810b015e3 (diff) | |
download | nextcloud-server-5d72681d10527c7719d8d296657dc3127b7f379d.tar.gz nextcloud-server-5d72681d10527c7719d8d296657dc3127b7f379d.zip |
Better place to check caching headers
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php index ddf410c3163..52a497e076d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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; |