From: skodak Date: Fri, 30 Jun 2006 07:23:08 +0000 (+0000) Subject: Bug #5802 - Incorrect length in http partial content (206) packets.; merged from... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=aba588a72635d8da9f6789052daed62e60ca6702;p=moodle.git Bug #5802 - Incorrect length in http partial content (206) packets.; merged from MOODLE_16_STABLE --- diff --git a/lib/filelib.php b/lib/filelib.php index 7224a36e5c..cd47fb1ea3 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -561,9 +561,9 @@ function byteserving_send_file($filename, $mimetype, $ranges) { } else { // multiple ranges requested - not tested much $totallength = 0; foreach($ranges as $range) { - $totallength .= strlen($range[0]) + $range[2] - $range[1] + 1; + $totallength += strlen($range[0]) + $range[2] - $range[1] + 1; } - $totallength .= strlen("\r\n--".BYTESERVING_BOUNDARY."--\r\n"); + $totallength += strlen("\r\n--".BYTESERVING_BOUNDARY."--\r\n"); @header('HTTP/1.1 206 Partial content'); @header('Content-Length: '.$totallength); @header('Content-Type: multipart/byteranges; boundary='.BYTESERVING_BOUNDARY);