Disable output gzipping during file download... it negates the memory usage controls
authorDan Fuhry <dan@enanocms.org>
Mon, 16 Jan 2012 09:23:20 -0500
changeset 1359 53c7e3cc7fb5
parent 1358 a8fc93c06fcb
child 1360 570abc94bd7f
child 1362 c690f0b39bcb
Disable output gzipping during file download... it negates the memory usage controls
plugins/SpecialUpdownload.php
--- a/plugins/SpecialUpdownload.php	Mon Jan 16 09:22:24 2012 -0500
+++ b/plugins/SpecialUpdownload.php	Mon Jan 16 09:23:20 2012 -0500
@@ -301,19 +301,20 @@
 	{
 		header('Content-disposition: attachment, filename="' . $filename . '";');
 	}
-	if ( !@$GLOBALS['do_gzip'] )
+	//if ( !@$GLOBALS['do_gzip'] )
 		header('Content-length: ' . $len);
 	
 	header('Last-Modified: '.enano_date('r', $row['time_id']));
 	
 	// using this method limits RAM consumption
+	@ob_end_flush();
 	while ( !feof($handle) )
 	{
 		echo fread($handle, 512000);
 	}
 	fclose($handle);
 	
-	gzip_output();
+	$db->close();
 	
 	exit;