mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
refactor: store header keys lower case internally (#10958)
This is a minor optimization that removes some header key lowercasing that previously happened on access.
This commit is contained in:
parent
b4026dac9c
commit
49ec3d10ad
4 changed files with 21 additions and 37 deletions
|
@ -152,10 +152,8 @@
|
|||
let charset = null;
|
||||
let essence = null;
|
||||
let mimeType = null;
|
||||
const values = getDecodeSplitHeader(
|
||||
headerListFromHeaders(this[_headers]),
|
||||
"Content-Type",
|
||||
);
|
||||
const headerList = headerListFromHeaders(this[_headers]);
|
||||
const values = getDecodeSplitHeader(headerList, "content-type");
|
||||
if (values === null) return null;
|
||||
for (const value of values) {
|
||||
const temporaryMimeType = mimesniff.parseMimeType(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue