diff options
Diffstat (limited to 'inc/init.php')
-rw-r--r-- | inc/init.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/init.php b/inc/init.php index 00d6a6a90..4289e30a9 100644 --- a/inc/init.php +++ b/inc/init.php @@ -60,6 +60,14 @@ // make session rewrites XHTML compliant @ini_set('arg_separator.output', '&'); + // enable gzip compression + if ($conf['gzip_output'] && + !defined('DOKU_DISABLE_GZIP_OUTPUT') && + function_exists('ob_gzhandler') && + preg_match('/gzip|deflate/', $_SERVER['HTTP_ACCEPT_ENCODING'])) { + ob_start('ob_gzhandler'); + } + // init session if (!headers_sent() && !defined('NOSESSION')){ session_name("DokuWiki"); |