From edd8bd0ee0ea6852f166f12632e8a3e1c6775cb2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 3 Dec 2018 12:27:46 -0500 Subject: [PATCH] cli: add --max-http-header-size flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow the maximum size of HTTP headers to be overridden from the command line. co-authored-by: Matteo Collina PR-URL: https://github.com/nodejs/node/pull/24811 Fixes: https://github.com/nodejs/node/issues/24692 Reviewed-By: Anna Henningsen Reviewed-By: Myles Borins Reviewed-By: Michael Dawson Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- doc/api/cli.md | 8 ++ doc/node.1 | 3 + src/node_http_parser_impl.h | 18 ++- src/node_options.cc | 4 + src/node_options.h | 1 + test/sequential/test-http-max-http-headers.js | 69 +++++++---- .../test-set-http-max-http-headers.js | 109 ++++++++++++++++++ 7 files changed, 184 insertions(+), 28 deletions(-) create mode 100644 test/sequential/test-set-http-max-http-headers.js diff --git a/doc/api/cli.md b/doc/api/cli.md index a4757c1d26ab60..cd171d9e3467b3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -197,6 +197,13 @@ added: v9.0.0 Specify the `file` of the custom [experimental ECMAScript Module][] loader. +### `--max-http-header-size=size` + + +Specify the maximum size, in bytes, of HTTP headers. Defaults to 8KB. + ### `--napi-modules`