From 489d3334dcca5369aa4248fd23f7cc1a3cdb243c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 28 Nov 2019 23:28:53 -0800 Subject: [PATCH] test: correct header length subtraction In test-http-max-http-headers, a comment asks why we are subtracting 32 from the length of the invalid-length-by-1 headers instead of just 1. Subtracting 1 seems to be correct and works. PR-URL: https://github.com/nodejs/node/pull/30712 Reviewed-By: David Carlier Reviewed-By: Luigi Pinca --- test/sequential/test-http-max-http-headers.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/sequential/test-http-max-http-headers.js b/test/sequential/test-http-max-http-headers.js index c8bfd07f9ffd8c..5077842608a043 100644 --- a/test/sequential/test-http-max-http-headers.js +++ b/test/sequential/test-http-max-http-headers.js @@ -42,8 +42,7 @@ function fillHeaders(headers, currentSize, valid = false) { // Generate valid headers if (valid) { - // TODO(mcollina): understand why -32 is needed instead of -1 - headers = headers.slice(0, -32); + headers = headers.slice(0, -1); } return headers + '\r\n\r\n'; }