From e64f2f5cd2dfa7bf50c7fdb275275c2d3de719ff Mon Sep 17 00:00:00 2001 From: suraj-shrivastav Date: Sun, 23 Aug 2026 22:48:57 +0530 Subject: [PATCH] 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: https://github.com/nodejs/node/issues/65470 Signed-off-by: suraj-shrivastav --- doc/api/http.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index b9d2fe4320da..5b3ccae4753c 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1127,7 +1127,7 @@ const hasContentType = request.hasHeader('content-type'); ### `request.maxHeadersCount` -* Type: {number} **Default:** `2000` +* Type: {number} **Default:** `1000` Limits maximum response headers count. If set to 0, no limit will be applied. @@ -1914,7 +1914,7 @@ added: v5.7.0 added: v0.7.0 --> -* Type: {number} **Default:** `2000` +* Type: {number} **Default:** `1000` Limits maximum incoming headers count. If set to 0, no limit will be applied.