Experimentally changing how content-length works.
authorDan Fuhry <dan@enanocms.org>
Sat, 31 Jul 2010 14:12:56 -0400
changeset 1283 cdbc7f48ab72
parent 1282 49e90e1d9756
child 1284 35380c89b5bf
Experimentally changing how content-length works.
includes/functions.php
plugins/SpecialUpdownload.php
--- a/includes/functions.php	Sat Jul 31 11:46:53 2010 -0400
+++ b/includes/functions.php	Sat Jul 31 14:12:56 2010 -0400
@@ -3296,10 +3296,12 @@
 		if ( $return )
 		{
 			header('Content-encoding: gzip');
+			header('Content-length: ' . strlen($return));
 			echo $return;
 		}
 		else
 		{
+			header('Content-length: ' . strlen($gzip_contents));
 			echo $gzip_contents;
 		}
 	}
--- a/plugins/SpecialUpdownload.php	Sat Jul 31 11:46:53 2010 -0400
+++ b/plugins/SpecialUpdownload.php	Sat Jul 31 14:12:56 2010 -0400
@@ -301,7 +301,7 @@
 	{
 		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']));