Skip to content

Commit

Permalink
fix(fetch): spec (nodejs#1295)
Browse files Browse the repository at this point in the history
* fix(fetch): spec

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fiuxp

* fixup

* fixup

* fiuxp

* fiuxp

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup

* fixup
  • Loading branch information
ronag authored and metcoder95 committed Dec 26, 2022
1 parent 000249a commit 1614770
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 254 deletions.
3 changes: 3 additions & 0 deletions lib/fetch/constants.js
Expand Up @@ -86,9 +86,12 @@ const subresource = [
''
]

const corsSafeListedResponseHeaderNames = [] // TODO

module.exports = {
subresource,
forbiddenResponseHeaderNames,
corsSafeListedResponseHeaderNames,
forbiddenMethods,
requestBodyHeader,
referrerPolicy,
Expand Down
7 changes: 4 additions & 3 deletions lib/fetch/headers.js
Expand Up @@ -346,11 +346,12 @@ class Headers {
const callback = args[0]
const thisArg = args[1]

for (let index = 0; index < this[kHeadersList].length; index += 2) {
const clone = this[kHeadersList].slice()
for (let index = 0; index < clone.length; index += 2) {
callback.call(
thisArg,
this[kHeadersList][index + 1],
this[kHeadersList][index],
clone[index + 1],
clone[index],
this
)
}
Expand Down

0 comments on commit 1614770

Please sign in to comment.