From 04b5336de11f6344e600ed4eb0e20e2550a37255 Mon Sep 17 00:00:00 2001 From: tsctx <91457664+tsctx@users.noreply.github.com> Date: Sun, 3 Dec 2023 16:12:50 +0900 Subject: [PATCH] fixup --- lib/core/constants.js | 2 +- lib/core/util.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/constants.js b/lib/core/constants.js index 3675d446cce..dcb607a6a1f 100644 --- a/lib/core/constants.js +++ b/lib/core/constants.js @@ -118,7 +118,7 @@ for (let i = 0; i < wellknownHeaderNames.length; ++i) { const key = wellknownHeaderNames[wellknownHeaderNames[i]] const lowerCasedKey = key.toLowerCase() headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - key + lowerCasedKey } // Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. diff --git a/lib/core/util.js b/lib/core/util.js index 886b72da520..35a935a5e71 100644 --- a/lib/core/util.js +++ b/lib/core/util.js @@ -226,7 +226,7 @@ function parseHeaders (headers, obj = {}) { for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString() const lowerCasedKey = headerNameLowerCasedRecord[key] ?? key.toLowerCase() - let val = obj[key] + let val = obj[lowerCasedKey] if (!val) { if (Array.isArray(headers[i + 1])) {