diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2010-01-07 10:41:19 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-07 10:41:19 -0800 |
| commit | c711bf1b1fcf7840467a7a044b1f511e7b69c139 (patch) | |
| tree | ee84a16b5ce4448fd41ba7ffa2cb2381b225e206 /modules/gallery/controllers/file_proxy.php | |
| parent | 31454d37b3ea02104925f1976609576c5f09c0c6 (diff) | |
| parent | 10c05c855a1634a60048a52e8d90bc51f187ede7 (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
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") { |
