diff options
author | Marcos Casagrande <marcoscvp90@gmail.com> | 2020-07-08 04:25:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 22:25:34 -0400 |
commit | e4899b6ba417a801ce3d9128c9769e855487682f (patch) | |
tree | e610fc41996679ed9e863cddee028a0a22c36fa8 /cli/js/web/fetch.ts | |
parent | cb98a594522e44fca885ca94ffdcc181ad902603 (diff) |
perf(cli/body): improve .arrayBuffer() speed (#6669)
Diffstat (limited to 'cli/js/web/fetch.ts')
-rw-r--r-- | cli/js/web/fetch.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/js/web/fetch.ts b/cli/js/web/fetch.ts index 156c218a4..33cf12069 100644 --- a/cli/js/web/fetch.ts +++ b/cli/js/web/fetch.ts @@ -110,8 +110,9 @@ export class Response extends Body.Body implements domTypes.Response { } const contentType = headers.get("content-type") || ""; + const size = Number(headers.get("content-length")) || undefined; - super(body, contentType); + super(body, { contentType, size }); this.url = url; this.statusText = statusText; |