diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-11-21 00:00:43 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-12-01 03:00:46 +0100 |
commit | 6bf5a1d691291cdfcc4941e68f00d0003e565476 (patch) | |
tree | 9cc41f5c66cf6ac67b9392c06619125cc33585e9 /doc | |
parent | 2205f85b2caadee425a0a86bd8cc3bcb889e4bfe (diff) | |
download | android-node-v8-6bf5a1d691291cdfcc4941e68f00d0003e565476.tar.gz android-node-v8-6bf5a1d691291cdfcc4941e68f00d0003e565476.tar.bz2 android-node-v8-6bf5a1d691291cdfcc4941e68f00d0003e565476.zip |
http: make maximum header size configurable per-stream or per-server
Make `maxHeaderSize` a.k.a. `--max-header-size` configurable now that
the legacy parser is gone (which only supported a single global value).
Refs: https://github.com/nodejs/node/pull/30567
PR-URL: https://github.com/nodejs/node/pull/30570
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/http.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/api/http.md b/doc/api/http.md index 9762abd27e..89031331d2 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2047,6 +2047,9 @@ Found'`. <!-- YAML added: v0.1.13 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/30570 + description: The `maxHeaderSize` option is supported now. - version: v9.6.0, v8.12.0 pr-url: https://github.com/nodejs/node/pull/15752 description: The `options` argument is supported now. @@ -2059,6 +2062,10 @@ changes: * `ServerResponse` {http.ServerResponse} Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. **Default:** `ServerResponse`. + * `maxHeaderSize` {number} Optionally overrides the value of + [`--max-http-header-size`][] for requests received by this server, i.e. + the maximum length of request headers in bytes. + **Default:** 8192 (8KB). * `requestListener` {Function} * Returns: {http.Server} @@ -2156,11 +2163,17 @@ added: v11.6.0 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. +This can be overridden for servers and client requests by passing the +`maxHeaderSize` option. + ## http.request(options\[, callback\]) ## http.request(url\[, options\]\[, callback\]) <!-- YAML added: v0.3.6 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/30570 + description: The `maxHeaderSize` option is supported now. - version: v10.9.0 pr-url: https://github.com/nodejs/node/pull/21616 description: The `url` parameter can now be passed along with a separate @@ -2196,6 +2209,10 @@ changes: `hostname` will be used if both `host` and `hostname` are specified. * `localAddress` {string} Local interface to bind for network connections. * `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][]. + * `maxHeaderSize` {number} Optionally overrides the value of + [`--max-http-header-size`][] for requests received from the server, i.e. + the maximum length of response headers in bytes. + **Default:** 8192 (8KB). * `method` {string} A string specifying the HTTP request method. **Default:** `'GET'`. * `path` {string} Request path. Should include query string if any. |