Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: replace forEach test-http-server-multiheaders2
  • Loading branch information
mmachera committed Nov 18, 2023
commit 484de3504a415bb6151b6ca4285fdad6a9682afa
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){
Comment thread
lpinca marked this conversation as resolved.
Outdated
assert.strictEqual(req.headers[header.toLowerCase()], 'foo',
`header parsed incorrectly: ${header}`);
});
multipleAllowed.forEach(function(header) {
};
for (const header of multipleAllowed){
Comment thread
lpinca marked this conversation as resolved.
Outdated
const sep = (header.toLowerCase() === 'cookie' ? '; ' : ', ');
assert.strictEqual(req.headers[header.toLowerCase()], `foo${sep}bar`,
`header parsed incorrectly: ${header}`);
});
};
Comment thread
lpinca marked this conversation as resolved.
Outdated

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