Chromium Code Reviews| Index: LayoutTests/http/tests/media/resources/serve-video.php |
| diff --git a/LayoutTests/http/tests/media/resources/serve-video.php b/LayoutTests/http/tests/media/resources/serve-video.php |
| index 55b3303f48679a7f18c082e8c035befe8116dd4c..b8262ad94af738a3a8e6b73726ded94845a6d6a8 100644 |
| --- a/LayoutTests/http/tests/media/resources/serve-video.php |
| +++ b/LayoutTests/http/tests/media/resources/serve-video.php |
| @@ -7,9 +7,9 @@ |
| $start = 0; |
| $end = $fileSize - 1; |
| $contentRange = $_SERVER["HTTP_RANGE"]; |
| - if (isset($contentRange)) { |
| - $range = explode("-", substr($contentRange, strlen("bytes="))); |
| - $start = intval($range[0]); |
| + if (isset($contentRange) && empty($_GET["norange"])) { |
| + $range = explode("-", substr($contentRange, strlen("bytes="))); |
| + $start = intval($range[0]); |
| if (!empty($range[1])) |
| $end = intval($range[1]); |
| $httpStatus = "206 Partial Content"; |
| @@ -22,10 +22,11 @@ |
| header("Pragma: no-cache"); |
| header("Etag: " . '"' . $fileSize . "-" . filemtime($fileName) . '"'); |
| header("Content-Type: " . $type); |
| - header("Accept-Ranges: bytes"); |
| header("Content-Length: " . ($end - $start) + 1); |
| - if ($contentRange) |
| - header("Content-Range: bytes " . $start . "-" . $end . "/" . $fileSize); |
| + if ($contentRange && empty($_GET["norange"])) { |
| + header("Accept-Ranges: bytes"); |
| + header("Content-Range: bytes " . $start . "-" . $end . "/" . $fileSize); |
|
philipj_slow
2014/10/01 10:47:18
Can you replace the tabs with spaces? You didn't a
DaleCurtis
2014/10/07 23:27:58
Done.
|
| + } |
| header("Connection: close"); |
| $chunkSize = 1024 * 256; |