From 3138b5c7607b434fa9b1b8c563ad461985d5b5c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 May 2006 23:27:51 +0200 Subject: moved gzip compression to init.php darcs-hash:20060519212751-7ad00-ace54b61706fdf4f1b7c2abdbabee215a1e256ab.gz --- inc/init.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc/init.php') 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"); -- cgit v1.2.3