Skip to content

Commit e64f2f5

Browse files
doc: fix incorrect default for maxHeadersCount
request.maxHeadersCount and server.maxHeadersCount were documented with a default of 2000. The underlying parser limit, MAX_HEADER_PAIRS in lib/_http_common.js, is a count of name/value pairs (2 slots per header), so the effective maximum number of headers is 1000, not 2000. Verified against a running server: sending 1000 headers returns all of them, while sending 1001 headers still returns only 1000, with the extra header silently dropped. Fixes: #65470 Signed-off-by: suraj-shrivastav <suraj.shrivastavvv@gmail.com>
1 parent 0b89f8f commit e64f2f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

doc/api/http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ const hasContentType = request.hasHeader('content-type');
11271127

11281128
### `request.maxHeadersCount`
11291129

1130-
* Type: {number} **Default:** `2000`
1130+
* Type: {number} **Default:** `1000`
11311131

11321132
Limits maximum response headers count. If set to 0, no limit will be applied.
11331133

@@ -1914,7 +1914,7 @@ added: v5.7.0
19141914
added: v0.7.0
19151915
-->
19161916

1917-
* Type: {number} **Default:** `2000`
1917+
* Type: {number} **Default:** `1000`
19181918

19191919
Limits maximum incoming headers count. If set to 0, no limit will be applied.
19201920

0 commit comments

Comments
 (0)