perf(cli/body): improve .arrayBuffer() speed (#6669)

This commit is contained in:
Marcos Casagrande 2020-07-08 04:25:34 +02:00 committed by GitHub
parent cb98a59452
commit e4899b6ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 23 deletions

View file

@ -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;