can't they decide on one single thing...

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9341 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2009-02-25 15:09:04 +00:00
parent bd316f9c48
commit 354f9edd4e

View file

@ -464,8 +464,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
$is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
header('Content-Type: ' . $attachment['mimetype'] . (($is_ie8) ? '; authoritative=true;' : ''));
header('Content-Type: ' . $attachment['mimetype']);
if ($is_ie8)
{
header('X-Content-Type-Options: nosniff');
}
if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
{
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));