From 446f8b54e50f5484aee7faacc6e48f11115b982b Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 5 Dec 2018 19:59:12 -0500 Subject: [PATCH] http: add maxHeaderSize property This commit exposes the value of --max-http-header-size as a property of the http module. Backport-PR-URL: https://github.com/nodejs/node/pull/25218 PR-URL: https://github.com/nodejs/node/pull/24860 Reviewed-By: Richard Lau Reviewed-By: Matteo Collina Reviewed-By: Michael Dawson Reviewed-By: Shelley Vohr Reviewed-By: James M Snell --- doc/api/http.md | 11 +++++++++++ lib/http.js | 13 +++++++++++++ test/parallel/test-http-max-header-size.js | 11 +++++++++++ 3 files changed, 35 insertions(+) create mode 100644 test/parallel/test-http-max-header-size.js diff --git a/doc/api/http.md b/doc/api/http.md index 391a2bf4232f7a..86ad7d66911163 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1805,6 +1805,16 @@ added: v0.5.9 Global instance of `Agent` which is used as the default for all HTTP client requests. +## http.maxHeaderSize + + +* {number} + +Read-only property specifying the maximum allowed size of HTTP headers in bytes. +Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option. + ## http.request(options[, callback])