From 29d6b4ce7fd9383ab213039e59bfee86e495c00b Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Wed, 26 Apr 2023 22:24:02 -0700 Subject: [PATCH] fix: Fix HEAD request exception (#5194) We should not look for response data in a HEAD request. Fixes #5164 --- lib/net/networking_engine.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/net/networking_engine.js b/lib/net/networking_engine.js index 6586085330..389ff0e565 100644 --- a/lib/net/networking_engine.js +++ b/lib/net/networking_engine.js @@ -309,6 +309,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget { if (!responseAndGotProgress.gotProgress && this.onProgressUpdated_ && !response.fromCache && + request.method != 'HEAD' && type == shaka.net.NetworkingEngine.RequestType.SEGMENT) { this.onProgressUpdated_(response.timeMs, response.data.byteLength); }