diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-07-12 23:01:37 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 13:31:37 -0400 |
commit | 5b26a4a30e67b56232dd306b4735b759df9b16d1 (patch) | |
tree | 840612397bf0593cb7e73ac727bdfb75619e43e8 /ext/fetch/23_request.js | |
parent | dcd05d4cb9780b7ab6753de5267bc59d834d8022 (diff) |
fix(ext/http): reading headers with ongoing body reader (#15161)
Diffstat (limited to 'ext/fetch/23_request.js')
-rw-r--r-- | ext/fetch/23_request.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index 3058db6f7..cbc6a887b 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -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; }, |