Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx committed Dec 3, 2023
1 parent 6cafab5 commit 04b5336
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/core/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion lib/core/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down

0 comments on commit 04b5336

Please sign in to comment.