diff options
author | Rich Trott <rtrott@gmail.com> | 2019-11-28 23:28:53 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-01 02:42:11 -0800 |
commit | 05c5ebbe12db965bcf3fa0f652352fb337b09723 (patch) | |
tree | 7c414f03226a97dd7c96b81563dbb961d2f744fe /test | |
parent | d2ea4cf0ed82ff2ecc42f67e286249e9ec8fe049 (diff) | |
download | android-node-v8-05c5ebbe12db965bcf3fa0f652352fb337b09723.tar.gz android-node-v8-05c5ebbe12db965bcf3fa0f652352fb337b09723.tar.bz2 android-node-v8-05c5ebbe12db965bcf3fa0f652352fb337b09723.zip |
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 <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/sequential/test-http-max-http-headers.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/sequential/test-http-max-http-headers.js b/test/sequential/test-http-max-http-headers.js index d421ad5f2b..04fdebd48c 100644 --- a/test/sequential/test-http-max-http-headers.js +++ b/test/sequential/test-http-max-http-headers.js @@ -37,8 +37,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'; } |