doc: fix default value for maxHeadersCount in http.md - #65541
Closed
santusht06 wants to merge 1 commit into
Closed
Conversation
The documentation previously stated that the default for `server.maxHeadersCount` and `request.maxHeadersCount` was 2000. However, `MAX_HEADER_PAIRS` in `lib/_http_common.js` limits parser pairs (header name and value strings) to 2000, which corresponds to an effective default limit of 1000 headers. Fixes: nodejs#65470 Signed-off-by: Santusht kotai <115890693+santusht06@users.noreply.github.com>
santusht06
force-pushed
the
doc-fix-max-headers-count-default
branch
from
August 25, 2026 12:27
2e3e5a1 to
0bf1e5d
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The documentation previously stated that the default for
server.maxHeadersCountandrequest.maxHeadersCountwas2000.However,
MAX_HEADER_PAIRSinlib/_http_common.jslimits the parser's header pairs array (alternating header name and value strings) to2000. Because each incoming HTTP header consumes two array elements, the actual default limit is 1000 headers before returning431 Request Header Fields Too Large.Changes
server.maxHeadersCountdefault from2000to1000indoc/api/http.md.request.maxHeadersCountdefault from2000to1000indoc/api/http.md.Fixes: #65470