Skip to content

Commit

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

Fixes shaka-project#5164
  • Loading branch information
joeyparrish committed Apr 27, 2023
1 parent 577b00b commit 330f04b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/net/networking_engine.js
Expand Up @@ -320,6 +320,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 330f04b

Please sign in to comment.