[Openupload-svn-update] SF.net SVN: openupload:[50] trunk/lib/modules/default/files.inc.php
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-10-22 17:46:03
|
Revision: 50
http://openupload.svn.sourceforge.net/openupload/?rev=50&view=rev
Author: tsdogs
Date: 2008-10-22 17:46:00 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
fix memory limit hit when serving big files (disable output buffer)
Modified Paths:
--------------
trunk/lib/modules/default/files.inc.php
Modified: trunk/lib/modules/default/files.inc.php
===================================================================
--- trunk/lib/modules/default/files.inc.php 2008-10-22 17:45:12 UTC (rev 49)
+++ trunk/lib/modules/default/files.inc.php 2008-10-22 17:46:00 UTC (rev 50)
@@ -245,7 +245,8 @@
/* if we got this far the download should begin serving */
$file = app()->config['DATA_PATH'].'/'.$finfo['id'];
$filesize = filesize($file);
- ob_clean();
+ /* disable and clean output buffer so it won't reach memory limit */
+ ob_end_clean();
header('Content-Type: '.$finfo['mime']);
header('Content-Length: '.$filesize);
header('Content-Disposition: attachment; filename="'.$finfo['name'].'"');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|