mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 14:41:15 +00:00
perf(cli/body): improve .arrayBuffer() speed (#6669)
This commit is contained in:
parent
cb98a59452
commit
e4899b6ba4
5 changed files with 48 additions and 23 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue