diff --git a/phpBB/admin/page_header_admin.php b/phpBB/admin/page_header_admin.php index 73e6757b34..87ff439a7a 100644 --- a/phpBB/admin/page_header_admin.php +++ b/phpBB/admin/page_header_admin.php @@ -35,7 +35,9 @@ if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); - if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') ) + $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT; + + if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) { @@ -129,4 +131,4 @@ $template->assign_vars(array( $template->pparse('header'); -?> \ No newline at end of file +?> diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index ea5b6bb8fb..e35afeb7e8 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -138,6 +138,7 @@ h3 {font-size:12pt;color:blue}
  • Fixed incomplete deletion of PMs when removing the associated user
  • Fixed unread and new PM user counters to decrement appropriately in all situations
  • Fixed possible cross-site scripting issue with username search
  • +
  • Fixed some problems with gzip in combination with newer PHP versions and Mozilla
  • diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index e90783d9d5..7ba0a31696 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.php @@ -35,7 +35,9 @@ if ( $board_config['gzip_compress'] ) { $phpver = phpversion(); - if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') ) + $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT; + + if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) {