mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 23:37:39 +02:00
fix useragent string
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5111 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -35,7 +35,7 @@ if ( $board_config['gzip_compress'] )
|
|||||||
{
|
{
|
||||||
$phpver = phpversion();
|
$phpver = phpversion();
|
||||||
|
|
||||||
$useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
|
$useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
|
||||||
|
|
||||||
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
|
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ if ( $board_config['gzip_compress'] )
|
|||||||
{
|
{
|
||||||
$phpver = phpversion();
|
$phpver = phpversion();
|
||||||
|
|
||||||
$useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
|
$useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
|
||||||
|
|
||||||
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
|
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
|
||||||
{
|
{
|
||||||
@@ -466,7 +466,7 @@ else
|
|||||||
|
|
||||||
// Work around for "current" Apache 2 + PHP module which seems to not
|
// Work around for "current" Apache 2 + PHP module which seems to not
|
||||||
// cope with private cache control setting
|
// cope with private cache control setting
|
||||||
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
|
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
|
||||||
{
|
{
|
||||||
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
|
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user