Commit 75d1ee51 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5469 Also removed MSIE 5&6 specific treatment

parent fc2728c9
......@@ -2376,9 +2376,7 @@ function send_binary_content($data, $name, $type = "application/octet-stream")
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0");
header("Content-type: ".$type."");
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
header("Content-type: ".$type);
/* Strip name if it is a complete path */
if (preg_match ("/\//", $name)) {
......@@ -2386,11 +2384,7 @@ function send_binary_content($data, $name, $type = "application/octet-stream")
}
/* force download dialog */
if (preg_match('/MSIE 5.5/', $HTTP_USER_AGENT) || preg_match('/MSIE 6.0/', $HTTP_USER_AGENT)) {
header('Content-Disposition: filename="'.$name.'"');
} else {
header('Content-Disposition: attachment; filename="'.$name.'"');
}
header('Content-Disposition: attachment; filename="'.$name.'"');
echo $data;
exit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment