From 8816a86be71efdacb9b1101b9e2b0ffb89f0ca42 Mon Sep 17 00:00:00 2001 From: h7lin Date: Thu, 6 Feb 2020 23:07:58 +0800 Subject: [PATCH] v12.15.0 --- cli/insecure_http_parser.md | 9 +++++++++ cli/node_options_options.md | 1 + http/http_createserver_options_requestlistener.md | 9 +++++++-- http/http_request_url_options_callback.md | 4 ++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 cli/insecure_http_parser.md diff --git a/cli/insecure_http_parser.md b/cli/insecure_http_parser.md new file mode 100644 index 00000000..814dacee --- /dev/null +++ b/cli/insecure_http_parser.md @@ -0,0 +1,9 @@ + + +Use an insecure HTTP parser that accepts invalid HTTP headers. This may allow +interoperability with non-conformant HTTP implementations. It may also allow +request smuggling and other HTTP attacks that rely on invalid headers being +accepted. Avoid using this option. + diff --git a/cli/node_options_options.md b/cli/node_options_options.md index 5c059834..87199277 100644 --- a/cli/node_options_options.md +++ b/cli/node_options_options.md @@ -55,6 +55,7 @@ Node.js options that are allowed are: * `--http-server-default-timeout` * `--icu-data-dir` * `--input-type` +* `--insecure-http-parser` * `--inspect-brk` * `--inspect-port`, `--debug-port` * `--inspect-publish-uid` diff --git a/http/http_createserver_options_requestlistener.md b/http/http_createserver_options_requestlistener.md index af977e17..7bf0058c 100644 --- a/http/http_createserver_options_requestlistener.md +++ b/http/http_createserver_options_requestlistener.md @@ -1,17 +1,22 @@ + * `options` {Object} * `IncomingMessage` {http.IncomingMessage} 指定要使用的 `IncomingMessage` 类。用于扩展原始的 `IncomingMessage`。**默认值:** `IncomingMessage`。 - * `ServerResponse` {http.ServerResponse} 指定要使用的 `ServerResponse` 类。用于扩展原始 `ServerResponse`。**默认值:** `ServerResponse`。 + * `ServerResponse` {http.ServerResponse} 指定要使用的 `ServerResponse` 类。用于扩展原始的 `ServerResponse`。**默认值:** `ServerResponse`。 + * `insecureHTTPParser` {boolean} 使用不安全的 HTTP 解析器,当为 `true` 时接受无效的 HTTP 请求头。应避免使用不安全的解析器。有关更多信息,参阅 [`--insecure-http-parser`]。**默认值:** `false`。 * `requestListener` {Function} * 返回: {http.Server} -返回新建的 [`http.Server`] 实例。 +返回新的 [`http.Server`] 实例。 `requestListener` 是一个自动添加到 [`'request'`] 事件的函数。 diff --git a/http/http_request_url_options_callback.md b/http/http_request_url_options_callback.md index e59f4319..3d931406 100644 --- a/http/http_request_url_options_callback.md +++ b/http/http_request_url_options_callback.md @@ -1,6 +1,9 @@