aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMáté Bartus <mate.bartus@gmail.com>2016-03-08 22:07:11 +0100
committerMáté Bartus <mate.bartus@gmail.com>2016-03-08 22:07:11 +0100
commit05ccbc512dbb14731e23457dbd4e6591ef27e0fb (patch)
treee9b0f21f3eb3cff1ea5493fd53629faa853159b9 /phpBB/includes/functions.php
parentf55a61d067fbc6c36348c3203e965d54b02198fd (diff)
parent62a261930073837d10993fae81202517bc04e122 (diff)
downloadforums-05ccbc512dbb14731e23457dbd4e6591ef27e0fb.tar
forums-05ccbc512dbb14731e23457dbd4e6591ef27e0fb.tar.gz
forums-05ccbc512dbb14731e23457dbd4e6591ef27e0fb.tar.bz2
forums-05ccbc512dbb14731e23457dbd4e6591ef27e0fb.tar.xz
forums-05ccbc512dbb14731e23457dbd4e6591ef27e0fb.zip
Merge pull request #4204 from marc1706/ticket/14483
[ticket/14483] Do not send headers by default on access via controller
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php27
1 files changed, 16 insertions, 11 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index b6334a2bca..ad361107af 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4909,7 +4909,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
/**
* Generate page header
*/
-function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum')
+function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = true)
{
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path;
@@ -5249,17 +5249,22 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'SITE_LOGO_IMG' => $user->img('site_logo'),
));
- // An array of http headers that phpbb will set. The following event may override these.
- $http_headers = array(
- // application/xhtml+xml not used because of IE
- 'Content-type' => 'text/html; charset=UTF-8',
- 'Cache-Control' => 'private, no-cache="set-cookie"',
- 'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
- );
- if (!empty($user->data['is_bot']))
+ $http_headers = array();
+
+ if ($send_headers)
{
- // Let reverse proxies know we detected a bot.
- $http_headers['X-PHPBB-IS-BOT'] = 'yes';
+ // An array of http headers that phpbb will set. The following event may override these.
+ $http_headers += array(
+ // application/xhtml+xml not used because of IE
+ 'Content-type' => 'text/html; charset=UTF-8',
+ 'Cache-Control' => 'private, no-cache="set-cookie"',
+ 'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
+ );
+ if (!empty($user->data['is_bot']))
+ {
+ // Let reverse proxies know we detected a bot.
+ $http_headers['X-PHPBB-IS-BOT'] = 'yes';
+ }
}
/**