summaryrefslogtreecommitdiffstats
path: root/system/libraries/Output.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-21 06:45:20 +0200
committeradmin <devnull@localhost>2006-09-21 06:45:20 +0200
commit9aaa75ed7cd7b2a95cff5b8a52a59c1e6dcf9da6 (patch)
tree6d7599e7cae08438a1546d9293838c92ad5fc320 /system/libraries/Output.php
parent03152efb757866c6a2aac6ecfbeb551444f7af78 (diff)
Diffstat (limited to 'system/libraries/Output.php')
-rw-r--r--system/libraries/Output.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/system/libraries/Output.php b/system/libraries/Output.php
index b09bf2a53..4a3adb858 100644
--- a/system/libraries/Output.php
+++ b/system/libraries/Output.php
@@ -86,7 +86,6 @@ class CI_Output {
{
$this->headers[] = $header;
}
-
// --------------------------------------------------------------------
@@ -145,6 +144,19 @@ class CI_Output {
$output = str_replace('{memory_usage}', $memory, $output);
$output = str_replace('{elapsed_time}', $elapsed, $output);
+ // Is compression requested?
+ $CFG =& _load_class('CI_Config');
+ if ($CFG->item('compress_output') === TRUE)
+ {
+ if (extension_loaded('zlib'))
+ {
+ if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) AND strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE)
+ {
+ ob_start('ob_gzhandler');
+ }
+ }
+ }
+
// Are there any server headers to send?
if (count($this->headers) > 0)
{