Skip to content

Commit

Permalink
test: replace forEach test-http-server-multiheaders2
Browse files Browse the repository at this point in the history
PR-URL: #50794
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
mmachera authored and RafaelGSS committed Jan 2, 2024
1 parent 941aedc commit aaf710f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-http-server-multiheaders2.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ const multipleForbidden = [
];

const server = http.createServer(function(req, res) {
multipleForbidden.forEach(function(header) {
for (const header of multipleForbidden) {
assert.strictEqual(req.headers[header.toLowerCase()], 'foo',
`header parsed incorrectly: ${header}`);
});
multipleAllowed.forEach(function(header) {
}
for (const header of multipleAllowed) {
const sep = (header.toLowerCase() === 'cookie' ? '; ' : ', ');
assert.strictEqual(req.headers[header.toLowerCase()], `foo${sep}bar`,
`header parsed incorrectly: ${header}`);
});
}

res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('EOF');
Expand Down

0 comments on commit aaf710f

Please sign in to comment.