summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/file_proxy.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2012-06-05 14:05:40 -0700
committerBharat Mediratta <bharat@menalto.com>2012-06-05 14:05:40 -0700
commita8034fe7b352e49b8f43c2c159626770740433a6 (patch)
tree3c65d88b37de5ddbf66bd6de674b681c6d295dd3 /modules/gallery/controllers/file_proxy.php
parentb29b3c91e77c2eda48de0a223ff77a6785c8d3e4 (diff)
parent6fbea19b352f880a6241dd359336ace5a4f26d22 (diff)
Merge pull request #68 from ffchung/patch-3
Force Turn off the compress as most image file already compressed. Preliminary change for #1879 - more coming.
Diffstat (limited to 'modules/gallery/controllers/file_proxy.php')
-rw-r--r--modules/gallery/controllers/file_proxy.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php
index 47def436..6c5419e8 100644
--- a/modules/gallery/controllers/file_proxy.php
+++ b/modules/gallery/controllers/file_proxy.php
@@ -29,6 +29,12 @@
class File_Proxy_Controller extends Controller {
const ALLOW_PRIVATE_GALLERY = true;
public function __call($function, $args) {
+
+ // Force Turn off the compress as most image file already compressed.
+ // And the compress will slow down the response.
+ if(ini_get('zlib.output_compression'))
+ ini_set('zlib.output_compression', 'Off');
+
// request_uri: gallery3/var/albums/foo/bar.jpg?m=1234
$request_uri = rawurldecode(Input::instance()->server("REQUEST_URI"));