fix iterating headers with `set-cookie`

Merged
DY
3y ago
+51-53

What does this PR do?

before:

const headers = new Headers();
headers.append("Set-Cookie", "cookies");
headers.append("Content-Type", "application/json");

console.log([...headers]);
// output: [ [ "content-type", "application/json" ], [ "content-type", "application/json" ] ]

after:

// output: [ [ "content-type", "application/json" ], [ "set-cookie", "cookies" ] ]

How did you verify your code works?

updated and added test for headers with set-cookie