diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-01-06 18:03:19 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-01-06 18:03:19 +0000 |
commit | 232c0b7fd0df7f84543bc29380a0734ef1e84a02 (patch) | |
tree | d5c4a59943387359a018a6f62c7915dfba7ff2d2 /modules/gallery/controllers/file_proxy.php | |
parent | bee51f53373aa6973a809fa5d6a6fd487e9d6426 (diff) | |
parent | c5d14438959346551765757a506689a7d8b13665 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/file_proxy.php')
-rw-r--r-- | modules/gallery/controllers/file_proxy.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 72c4e104..f0a38fbe 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -99,12 +99,6 @@ class File_Proxy_Controller extends Controller { throw new Kohana_404_Exception(); } - // Check that the content hasn't expired or it wasn't changed since cached - if (($last_modified = expires::get()) !== false && - $item->updated < $last_modified) { - expires::check(2592000); - } - // Don't try to load a directory if ($type == "albums" && $item->is_album()) { throw new Kohana_404_Exception(); @@ -114,10 +108,15 @@ class File_Proxy_Controller extends Controller { throw new Kohana_404_Exception(); } + header('Last-Modified: '.gmdate('D, d M Y H:i:s T', $item->updated)); + header("Pragma:"); + // Check that the content hasn't expired or it wasn't changed since cached + expires::check(2592000, $item->updated); + // We don't need to save the session for this request Session::abort_save(); - expires::set(2592000); // 30 days + expires::set(2592000, $item->updated); // 30 days // Dump out the image. If the item is a movie, then its thumbnail will be a JPG. if ($item->is_movie() && $type != "albums") { |