Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-01-22 00:35:27 +0300
committerAnna Henningsen <anna@addaleax.net>2020-01-24 19:54:23 +0300
commitd6f1e395ca74c34c3729d5089f9dbe5e41eab3da (patch)
treece3becd0623915af30df717c227dd2552157de81 /doc/api/http.md
parent748eae93c6c27087113c22f43c9690ee573162d1 (diff)
http: make --insecure-http-parser configurable per-stream or per-server
From the issue: > Some servers deviate from HTTP spec enougth that Node.js can't > communicate with them, but "work" when `--insecure-http-parser` > is enabled globally. It would be useful to be able to use this > mode, as a client, only when connecting to known bad servers. This is largely equivalent to https://github.com/nodejs/node/pull/31446 in terms of code changes. Fixes: https://github.com/nodejs/node/issues/31440 Refs: https://github.com/nodejs/node/pull/31446 PR-URL: https://github.com/nodejs/node/pull/31448 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc/api/http.md')
-rw-r--r--doc/api/http.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/api/http.md b/doc/api/http.md
index 14b900ac55f..dd90b54d3e1 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -2031,6 +2031,9 @@ Found'`.
<!-- YAML
added: v0.1.13
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/31448
+ description: The `insecureHTTPParser` option is supported now.
- version: v13.3.0
pr-url: https://github.com/nodejs/node/pull/30570
description: The `maxHeaderSize` option is supported now.
@@ -2046,6 +2049,10 @@ changes:
* `ServerResponse` {http.ServerResponse} Specifies the `ServerResponse` class
to be used. Useful for extending the original `ServerResponse`. **Default:**
`ServerResponse`.
+ * `insecureHTTPParser` {boolean} Use an insecure HTTP parser that accepts
+ invalid HTTP headers when `true`. Using the insecure parser should be
+ avoided. See [`--insecure-http-parser`][] for more information.
+ **Default:** `false`
* `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.
@@ -2155,6 +2162,9 @@ This can be overridden for servers and client requests by passing the
<!-- YAML
added: v0.3.6
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/31448
+ description: The `insecureHTTPParser` option is supported now.
- version: v13.3.0
pr-url: https://github.com/nodejs/node/pull/30570
description: The `maxHeaderSize` option is supported now.
@@ -2191,6 +2201,10 @@ changes:
request to. **Default:** `'localhost'`.
* `hostname` {string} Alias for `host`. To support [`url.parse()`][],
`hostname` will be used if both `host` and `hostname` are specified.
+ * `insecureHTTPParser` {boolean} Use an insecure HTTP parser that accepts
+ invalid HTTP headers when `true`. Using the insecure parser should be
+ avoided. See [`--insecure-http-parser`][] for more information.
+ **Default:** `false`
* `localAddress` {string} Local interface to bind for network connections.
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
* `maxHeaderSize` {number} Optionally overrides the value of
@@ -2364,6 +2378,7 @@ will be emitted in the following order:
Setting the `timeout` option or using the `setTimeout()` function will
not abort the request or do anything besides add a `'timeout'` event.
+[`--insecure-http-parser`]: cli.html#cli_insecure_http_parser
[`--max-http-header-size`]: cli.html#cli_max_http_header_size_size
[`'checkContinue'`]: #http_event_checkcontinue
[`'request'`]: #http_event_request