From 7463a988ea03c2b6548e1a37f422f0974b3e1446 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 23 Jun 2010 16:31:25 +0200 Subject: [PATCH] [ticket/9627] Make sure range request reads till the end of the file. PHPBB3-9627 --- phpBB/includes/functions_download.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index 7013a80418..d863d9f87b 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -542,6 +542,12 @@ function http_byte_range($filesize) } } + // We currently do not support range requests that end before the end of the file + if ($last_byte_pos != $filesize - 1) + { + continue; + } + return array( 'byte_pos_start' => $first_byte_pos, 'byte_pos_end' => $last_byte_pos,