[openupload-devel] (no subject)
Status: Beta
Brought to you by:
tsdogs
|
From: Hajek L. (IT) <Ha...@pe...> - 2009-01-13 11:06:49
|
--- files.inc.php.old 2009-01-13 00:44:56.000000000 +0100
+++ files.inc.php 2009-01-13 00:49:23.000000000 +0100
@@ -372,10 +372,18 @@
app()->log('notice','serveFile','','ALLOW',$finfo[$num]['id']);
/* disable and clean output buffer so it won't reach memory limit */
ob_end_clean();
- header('Content-Type: '.$finfo[$num]['mime']);
- header('Content-Length: '.$filesize);
- header('Content-Disposition: attachment; filename="'.$finfo[$num]['name'].'"');
- readfile($file);
+
+ header('Content-Description: File Transfer');
+ header('Content-Type: application/octet-stream');
+ header('Content-Disposition: attachment; filename="'.$finfo[$num]['name'].'"');
+ header('Content-Transfer-Encoding: binary');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Pragma: public');
+ header('Content-Length: ' .$filesize);
+ ob_clean();
+ flush;
+ readfile($file);
/* file should have been sent now let's reset the download info */
if (!$_SESSION['user']['d'][0]['protected'])
$_SESSION['user']['d'][$num]['candownload']='ok';
|