From f39d3cf57450f6b8f98893c3988bcd81dc018397 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 May 2010 00:40:18 +0000 Subject: [PATCH] On the fly GZIP compression is done only if bit 3 of constant is set (this is to allow to choose wich optimization we enabled among the 3 actually available). --- htdocs/main.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 05ac0504ae7..37bcb9e76da 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -749,9 +749,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs //header("Content-type: text/html; charset=UTF-8"); header("Content-type: text/html; charset=".$conf->file->character_set_client); - - // PHP compression - if (isset($conf->global->MAIN_OPTIMIZE_SPEED)) ob_start("ob_gzhandler"); + + // On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1. + if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); } print ''; //print '';