summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Schlager <mail@gerhard-schlager.at>2012-08-11 18:09:03 +0200
committerGerhard Schlager <mail@gerhard-schlager.at>2012-08-11 18:09:03 +0200
commita62e1aaf9d4cf8dfe66e21e8f642fc1b93abc460 (patch)
treede4cad32476db78ce1415b0a659df784b6d33eb7
parentd882c1ba78b6ae811abd226dd46446c914e74dd0 (diff)
the HTTP header Cache-Control must contain "public" in order to allow caching of resources when HTTPS is used
-rw-r--r--modules/gallery/controllers/combined.php4
-rw-r--r--system/helpers/expires.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/controllers/combined.php b/modules/gallery/controllers/combined.php
index cd84cb42..80ae1e2d 100644
--- a/modules/gallery/controllers/combined.php
+++ b/modules/gallery/controllers/combined.php
@@ -50,7 +50,7 @@ class Combined_Controller extends Controller {
if ($input->server("HTTP_IF_MODIFIED_SINCE")) {
header('HTTP/1.0 304 Not Modified');
header("Expires: Tue, 19 Jan 2038 00:00:00 GMT");
- header("Cache-Control: max-age=2678400");
+ header("Cache-Control: public,max-age=2678400");
header('Pragma: public');
Kohana::close_buffers(false);
return "";
@@ -83,7 +83,7 @@ class Combined_Controller extends Controller {
header("Content-Type: text/css; charset=UTF-8");
}
header("Expires: Tue, 19 Jan 2038 00:00:00 GMT");
- header("Cache-Control: max-age=2678400");
+ header("Cache-Control: public,max-age=2678400");
header("Pragma: public");
header("Last-Modified: " . gmdate("D, d M Y H:i:s T", time()));
header("Content-Length: " . strlen($content));
diff --git a/system/helpers/expires.php b/system/helpers/expires.php
index d510ba7c..a3e01b8e 100644
--- a/system/helpers/expires.php
+++ b/system/helpers/expires.php
@@ -31,7 +31,7 @@ class expires_Core {
header('Expires: '.gmdate('D, d M Y H:i:s T', $expires));
// HTTP 1.1
- header('Cache-Control: max-age='.$seconds);
+ header('Cache-Control: public,max-age='.$seconds);
return $expires;
}
@@ -94,7 +94,7 @@ class expires_Core {
header('Expires: '.gmdate('D, d M Y H:i:s T', $expires));
// HTTP 1.1
- header('Cache-Control: max-age='.$seconds);
+ header('Cache-Control: public,max-age='.$seconds);
// Clear any output
Event::add('system.display', create_function('', 'Kohana::$output = "";'));