From 484de3504a415bb6151b6ca4285fdad6a9682afa Mon Sep 17 00:00:00 2001 From: Marco Mac Date: Sat, 18 Nov 2023 17:25:25 +0100 Subject: [PATCH 1/4] test: replace forEach test-http-server-multiheaders2 --- test/parallel/test-http-server-multiheaders2.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index 1e19708557ef24..5e1899bc6ecfe4 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -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'); From 5959b61b8b26adac2e613bf8a532556dccdfd173 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 22 Nov 2023 22:13:03 +0100 Subject: [PATCH 2/4] Update test/parallel/test-http-server-multiheaders2.js --- test/parallel/test-http-server-multiheaders2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index 5e1899bc6ecfe4..66936d361e857e 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -70,7 +70,7 @@ const multipleForbidden = [ ]; const server = http.createServer(function(req, res) { - for (const header of multipleForbidden){ + for (const header of multipleForbidden) { assert.strictEqual(req.headers[header.toLowerCase()], 'foo', `header parsed incorrectly: ${header}`); }; From cff221285374761b21be7d4837e1f8c9295f69cc Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 22 Nov 2023 22:13:08 +0100 Subject: [PATCH 3/4] Update test/parallel/test-http-server-multiheaders2.js --- test/parallel/test-http-server-multiheaders2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index 66936d361e857e..c2aed0da4f37ce 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -73,8 +73,8 @@ const server = http.createServer(function(req, res) { for (const header of multipleForbidden) { assert.strictEqual(req.headers[header.toLowerCase()], 'foo', `header parsed incorrectly: ${header}`); - }; - for (const header of multipleAllowed){ + } + for (const header of multipleAllowed) { const sep = (header.toLowerCase() === 'cookie' ? '; ' : ', '); assert.strictEqual(req.headers[header.toLowerCase()], `foo${sep}bar`, `header parsed incorrectly: ${header}`); From 50f962dde4f1ac4b2277f0c61c3103a55ad81573 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 22 Nov 2023 22:13:13 +0100 Subject: [PATCH 4/4] Update test/parallel/test-http-server-multiheaders2.js --- test/parallel/test-http-server-multiheaders2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index c2aed0da4f37ce..b20a2674d3ba16 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -78,7 +78,7 @@ const server = http.createServer(function(req, res) { 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');