mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 14:48:53 +00:00
Merge pull request #2962 from Senky/ticket/13044
[ticket/13044] Expires header violates RFC 2616 * Senky/ticket/13044: [ticket/13044] Move GMT out of gmdate in functions_acp [ticket/13044] Move GMT out of gmdate() [ticket/13044] \G\M\T to GMT in whole project [ticket/13044] move GMT string out of gmdate() [ticket/13044] Correct Expires headers
This commit is contained in:
commit
7201238104
5 changed files with 9 additions and 9 deletions
|
@ -164,7 +164,7 @@ if (defined('DEBUG') && request_var('explain', 0) && $auth->acl_get('a_'))
|
||||||
{
|
{
|
||||||
header('Content-type: text/html; charset=UTF-8');
|
header('Content-type: text/html; charset=UTF-8');
|
||||||
header('Cache-Control: private, no-cache="set-cookie"');
|
header('Cache-Control: private, no-cache="set-cookie"');
|
||||||
header('Expires: 0');
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
|
||||||
$mtime = explode(' ', microtime());
|
$mtime = explode(' ', microtime());
|
||||||
|
|
|
@ -5062,7 +5062,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||||
// application/xhtml+xml not used because of IE
|
// application/xhtml+xml not used because of IE
|
||||||
'Content-type' => 'text/html; charset=UTF-8',
|
'Content-type' => 'text/html; charset=UTF-8',
|
||||||
'Cache-Control' => 'private, no-cache="set-cookie"',
|
'Cache-Control' => 'private, no-cache="set-cookie"',
|
||||||
'Expires' => '0',
|
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
|
||||||
'Pragma' => 'no-cache',
|
'Pragma' => 'no-cache',
|
||||||
);
|
);
|
||||||
if (!empty($user->data['is_bot']))
|
if (!empty($user->data['is_bot']))
|
||||||
|
|
|
@ -112,7 +112,7 @@ function adm_page_header($page_title)
|
||||||
// application/xhtml+xml not used because of IE
|
// application/xhtml+xml not used because of IE
|
||||||
'Content-type' => 'text/html; charset=UTF-8',
|
'Content-type' => 'text/html; charset=UTF-8',
|
||||||
'Cache-Control' => 'private, no-cache="set-cookie"',
|
'Cache-Control' => 'private, no-cache="set-cookie"',
|
||||||
'Expires' => '0',
|
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
|
||||||
'Pragma' => 'no-cache',
|
'Pragma' => 'no-cache',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -56,17 +56,17 @@ function send_avatar_to_browser($file, $browser)
|
||||||
|
|
||||||
if (strpos(strtolower($browser), 'msie 6.0') !== false)
|
if (strpos(strtolower($browser), 'msie 6.0') !== false)
|
||||||
{
|
{
|
||||||
header('Expires: -1');
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header('Content-Disposition: inline; ' . header_filename($file));
|
header('Content-Disposition: inline; ' . header_filename($file));
|
||||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
||||||
}
|
}
|
||||||
|
|
||||||
$size = @filesize($file_path);
|
$size = @filesize($file_path);
|
||||||
|
@ -197,7 +197,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
|
||||||
{
|
{
|
||||||
header('expires: -1');
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -421,7 +421,7 @@ function set_modified_headers($stamp, $browser)
|
||||||
send_status_line(304, 'Not Modified');
|
send_status_line(304, 'Not Modified');
|
||||||
// seems that we need those too ... browsers
|
// seems that we need those too ... browsers
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -445,7 +445,7 @@ class module
|
||||||
|
|
||||||
header('Content-type: text/html; charset=UTF-8');
|
header('Content-type: text/html; charset=UTF-8');
|
||||||
header('Cache-Control: private, no-cache="set-cookie"');
|
header('Cache-Control: private, no-cache="set-cookie"');
|
||||||
header('Expires: 0');
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue