Skip to content

Commit

Permalink
Bug #5802 - Incorrect length in http partial content (206) packets.; …
Browse files Browse the repository at this point in the history
…merged from MOODLE_16_STABLE
  • Loading branch information
skodak committed Jun 30, 2006
1 parent 95e8617 commit aba588a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/filelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aba588a

Please sign in to comment.