Skip to content

Commit

Permalink
fix: Fix HEAD request exception (#5194)
Browse files Browse the repository at this point in the history
We should not look for response data in a HEAD request.

Fixes #5164
  • Loading branch information
joeyparrish committed Apr 27, 2023
1 parent de98b25 commit 29d6b4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/net/networking_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 29d6b4c

Please sign in to comment.