Commit a7d58587 authored by Dries's avatar Dries
Browse files

- Patch #103164 by davea and RobRoy: made downloads work on IE6. Send correct headers.

parent 67774634
...@@ -265,12 +265,10 @@ function upload_file_download($file) { ...@@ -265,12 +265,10 @@ function upload_file_download($file) {
if (user_access('view uploaded files')) { if (user_access('view uploaded files')) {
$node = node_load($file->nid); $node = node_load($file->nid);
if (node_access('view', $node)) { if (node_access('view', $node)) {
$name = mime_header_encode($file->filename);
$type = mime_header_encode($file->filemime); $type = mime_header_encode($file->filemime);
return array( return array(
'Content-Type: '. $type .'; name='. $name, 'Content-Type: '. $type,
'Content-Length: '. $file->filesize, 'Content-Length: '. $file->filesize,
'Cache-Control: private'
); );
} }
else { else {
......
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