[Openupload-svn-update] SF.net SVN: openupload:[223] trunk/lib/modules/default/files.inc.php
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2009-02-03 18:46:46
|
Revision: 223
http://openupload.svn.sourceforge.net/openupload/?rev=223&view=rev
Author: tsdogs
Date: 2009-02-03 18:46:40 +0000 (Tue, 03 Feb 2009)
Log Message:
-----------
Fix problems with https and IE7 (Ladislav H?\195?\161jek)
Fix problems with ajax progress and IE7
Modified Paths:
--------------
trunk/lib/modules/default/files.inc.php
Modified: trunk/lib/modules/default/files.inc.php
===================================================================
--- trunk/lib/modules/default/files.inc.php 2009-02-03 18:44:53 UTC (rev 222)
+++ trunk/lib/modules/default/files.inc.php 2009-02-03 18:46:40 UTC (rev 223)
@@ -79,6 +79,8 @@
ob_clean();
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ // need this 'cause of IE problems
+ header('Content-Type: text/html; Charset=utf-8');
$progress = array('complete' => 0, 'total' => 0, 'percentage' => 0, 'files' => 0);
switch (app()->config['progress']) {
@@ -372,9 +374,15 @@
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-Description: File Transfer');
header('Content-Type: '.$finfo[$num]['mime']);
header('Content-Length: '.$filesize);
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');
+
readfile($file);
/* file should have been sent now let's reset the download info */
if (!$_SESSION['user']['d'][0]['protected'])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|