Skip to content

Commit

Permalink
v12.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
h7lin committed Feb 6, 2020
1 parent 1adba6e commit 8816a86
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
9 changes: 9 additions & 0 deletions cli/insecure_http_parser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- YAML
added: v12.15.0
-->

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.

1 change: 1 addition & 0 deletions cli/node_options_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
9 changes: 7 additions & 2 deletions http/http_createserver_options_requestlistener.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<!-- YAML
added: v0.1.13
changes:
- version: v12.15.0
pr-url: https://github.com/nodejs/node/pull/31448
description: The `insecureHTTPParser` 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.
-->

* `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'`] 事件的函数。

Expand Down
4 changes: 4 additions & 0 deletions http/http_request_url_options_callback.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- YAML
added: v0.3.6
changes:
- version: v12.15.0
pr-url: https://github.com/nodejs/node/pull/31448
description: The `insecureHTTPParser` 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
Expand All @@ -23,6 +26,7 @@ changes:
* `headers` {Object} 包含请求头的对象。
* `host` {string} 请求发送至的服务器的域名或 IP 地址。**默认值:** `'localhost'`
* `hostname` {string} `host` 的别名。为了支持 [`url.parse()`],如果同时指定 `host` `hostname`,则使用 `hostname`
* `insecureHTTPParser` {boolean} 使用不安全的 HTTP 解析器,当为 `true` 时接受无效的 HTTP 请求头。应避免使用不安全的解析器。有关更多信息,参阅 [`--insecure-http-parser`]**默认值:** `false`
* `localAddress` {string} 为网络连接绑定的本地接口。
* `lookup` {Function} 自定义的查找函数。 **默认值:** [`dns.lookup()`]
* `method` {string} 一个字符串,指定 HTTP 请求的方法。**默认值:** `'GET'`
Expand Down

0 comments on commit 8816a86

Please sign in to comment.