summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/combined.php
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-07-18 17:51:23 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-07-18 17:51:23 +0200
commitc78744d4f8a0cfad7ca5aa3d2867fb66d4c6b8c4 (patch)
treee2b4d5d066590a966d949409cb48104456edaf7e /modules/gallery/controllers/combined.php
parent7f5030ac208c30a7dc576a57cd9e665022ccbde5 (diff)
parentdf22832a5b7e7c1962940becab1c90aaec3392f9 (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'modules/gallery/controllers/combined.php')
-rw-r--r--modules/gallery/controllers/combined.php5
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();
}