fix(ext/http): reading headers with ongoing body reader (#15161)

This commit is contained in:
Divy Srivastava 2022-07-12 23:01:37 +05:30 committed by GitHub
parent dcd05d4cb9
commit 5b26a4a30e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 77 additions and 9 deletions

View file

@ -81,7 +81,11 @@
headerListInner: null,
get headerList() {
if (this.headerListInner === null) {
this.headerListInner = headerList();
try {
this.headerListInner = headerList();
} catch {
throw new TypeError("cannot read headers: request closed");
}
}
return this.headerListInner;
},