Skip to content

Commit

Permalink
fix isValidBinary(): only match content-length if it is actually pres…
Browse files Browse the repository at this point in the history
…ent, fixes #287
  • Loading branch information
ikreymer committed Jan 10, 2025
1 parent 3cdf441 commit 2143046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/requestresponseinfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class RequestResponseInfo {
const contentType = headers.get(CONTENT_TYPE);
const contentLength = headers.get(CONTENT_LENGTH);

if (Number(contentLength) !== length) {
if (contentLength !== null && Number(contentLength) !== length) {
return false;
}

Expand Down

0 comments on commit 2143046

Please sign in to comment.