Skip to content

Commit 489d333

Browse files
Trotttargos
authored andcommitted
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: #30712 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent e3c9e08 commit 489d333

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/sequential/test-http-max-http-headers.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ function fillHeaders(headers, currentSize, valid = false) {
4242

4343
// Generate valid headers
4444
if (valid) {
45-
// TODO(mcollina): understand why -32 is needed instead of -1
46-
headers = headers.slice(0, -32);
45+
headers = headers.slice(0, -1);
4746
}
4847
return headers + '\r\n\r\n';
4948
}

0 commit comments

Comments
 (0)