diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-07-18 16:12:40 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-18 16:12:40 -0700 |
commit | 322e2fab6be0717a95ca98a1d97f2e284ce5fcc2 (patch) | |
tree | 8f73f29f09547bb91c764bede2df2600c5faf719 /modules/gallery/controllers/combined.php | |
parent | 3b7855010f3b3ef84fc7a3b8889f58edaab9c5cc (diff) | |
parent | df22832a5b7e7c1962940becab1c90aaec3392f9 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/combined.php')
-rw-r--r-- | modules/gallery/controllers/combined.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gallery/controllers/combined.php b/modules/gallery/controllers/combined.php index 925d052d..9a790fdf 100644 --- a/modules/gallery/controllers/combined.php +++ b/modules/gallery/controllers/combined.php @@ -60,14 +60,15 @@ class Combined_Controller extends Controller { $cache = Cache::instance(); $use_gzip = function_exists("gzencode") && - (strpos($input->server("HTTP_ACCEPT_ENCODING"), "gzip") !== false); + stripos($input->server("HTTP_ACCEPT_ENCODING"), "gzip") !== false && + (int) ini_get("zlib.output_compression") === 0; + if ($use_gzip && $content = $cache->get("{$key}_gz")) { header("Content-Encoding: gzip"); } else { // Fall back to non-gzipped if we have to $content = $cache->get($key); } - if (empty($content)) { Kohana::show_404(); } |