Skip to content

Commit 2143046

Browse files
committed
fix isValidBinary(): only match content-length if it is actually present, fixes #287
1 parent 3cdf441 commit 2143046

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/requestresponseinfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ class RequestResponseInfo {
466466
const contentType = headers.get(CONTENT_TYPE);
467467
const contentLength = headers.get(CONTENT_LENGTH);
468468

469-
if (Number(contentLength) !== length) {
469+
if (contentLength !== null && Number(contentLength) !== length) {
470470
return false;
471471
}
472472

0 commit comments

Comments
 (0)