From c19cbafc10b6c2801fbbe81aa38154dbcf93c3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Tue, 27 May 2025 18:16:56 +0200 Subject: [PATCH] fix(net): Fix "Payload length does not match range requested bytes" when using open end (#8651) --- lib/net/http_fetch_plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/http_fetch_plugin.js b/lib/net/http_fetch_plugin.js index 9a320a247..47471e805 100644 --- a/lib/net/http_fetch_plugin.js +++ b/lib/net/http_fetch_plugin.js @@ -220,7 +220,7 @@ shaka.net.HttpFetchPlugin = class { if (request.headers['Range']) { const range = request.headers['Range'].replace('bytes=', '').split('-') - .map((r) => parseInt(r, 10)); + .filter((r) => r).map((r) => parseInt(r, 10)); if (range.length == 2 && arrayBuffer.byteLength != (range[1] - range[0] + 1)) { shaka.log.alwaysWarn(