From ae50f480d20f3cdcb6bb8400751d6845c49712d5 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. 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 | 14 ++++++++++++++ test/parallel/test-http-max-header-size.js | 11 +++++++++++ 3 files changed, 36 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 63f4c58a85d9bd..4e56f4ad00a391 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1912,6 +1912,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]) ## http.request(url[, options][, callback])