diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-02-13 22:47:31 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-02-13 22:47:31 +0100 |
commit | 594dcf13f2d311ba2161e33effe6e297939e3595 (patch) | |
tree | 3a4e8447bd11014e795ae67c382ad62eba466a97 /lib/response.php | |
parent | 0fd5252cfc7c6d85d27bf1ec62fadbbc3267c0a1 (diff) | |
download | nextcloud-server-594dcf13f2d311ba2161e33effe6e297939e3595.tar.gz nextcloud-server-594dcf13f2d311ba2161e33effe6e297939e3595.zip |
Contacts+OC_Respone: Move enableCaching out of setEtagHeader and setLastModifiedHeader
Diffstat (limited to 'lib/response.php')
-rw-r--r-- | lib/response.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/response.php b/lib/response.php index b5fca1cb227..a768366b02c 100644 --- a/lib/response.php +++ b/lib/response.php @@ -63,6 +63,7 @@ class OC_Response { $expires->add(new DateInterval($interval)); } if ($expires instanceof DateTime) { + $expires->setTimezone(new DateTimeZone('GMT')); $expires = $expires->format(DateTime::RFC2822); } header('Expires: '.$expires); @@ -72,7 +73,6 @@ class OC_Response { if (empty($etag)) { return; } - self::enableCaching(); if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { self::setStatus(self::STATUS_NOT_MODIFIED); @@ -88,7 +88,6 @@ class OC_Response { if ($lastModified instanceof DateTime) { $lastModified = $lastModified->format(DateTime::RFC2822); } - self::enableCaching(); if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && trim($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $lastModified) { self::setStatus(self::STATUS_NOT_MODIFIED); |