doc: fix nits in http(s) server.headersTimeout

* Fix sort orders of sections and bottom references.
* Fix links.
* Unify spelling.
* Add missing YAML block.

PR-URL: https://github.com/nodejs/node/pull/24697
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit is contained in:
Vse Mozhet Byt 2018-11-28 16:48:07 +02:00
parent 333783643e
commit acedf1a55a
2 changed files with 29 additions and 27 deletions

View File

@ -937,6 +937,26 @@ added: v0.1.90
Stops the server from accepting new connections. See [`net.Server.close()`][].
### server.headersTimeout
<!-- YAML
added: v11.3.0
-->
* {number} **Default:** `40000`
Limit the amount of time the parser will wait to receive the complete HTTP
headers.
In case of inactivity, the rules defined in [`server.timeout`][] apply. However,
that inactivity based timeout would still allow the connection to be kept open
if the headers are being sent very slowly (by default, up to a byte per 2
minutes). In order to prevent this, whenever header data arrives an additional
check is made that more than `server.headersTimeout` milliseconds has not
passed since the connection was established. If the check fails, a `'timeout'`
event is emitted on the server object, and (by default) the socket is destroyed.
See [`server.timeout`][] for more information on how timeout behavior can be
customized.
### server.listen()
Starts the HTTP server listening for connections.
@ -958,26 +978,6 @@ added: v0.7.0
Limits maximum incoming headers count. If set to 0, no limit will be applied.
### server.headersTimeout
<!-- YAML
added: v11.3.0
-->
* {number} **Default:** `40000`
Limit the amount of time the parser will wait to receive the complete HTTP
headers.
In case of inactivity, the rules defined in [server.timeout][] apply. However,
that inactivity based timeout would still allow the connection to be kept open
if the headers are being sent very slowly (by default, up to a byte per 2
minutes). In order to prevent this, whenever header data arrives an additional
check is made that more than `server.headersTimeout` milliseconds has not
passed since the connection was established. If the check fails, a `'timeout'`
event is emitted on the server object, and (by default) the socket is destroyed.
See [server.timeout][] for more information on how timeout behaviour can be
customised.
### server.setTimeout([msecs][, callback])
<!-- YAML
added: v0.9.12

View File

@ -32,6 +32,14 @@ added: v0.1.90
See [`server.close()`][`http.close()`] from the HTTP module for details.
### server.headersTimeout
<!-- YAML
added: v11.3.0
-->
- {number} **Default:** `40000`
See [`http.Server#headersTimeout`][].
### server.listen()
Starts the HTTPS server listening for encrypted connections.
@ -44,12 +52,6 @@ This method is identical to [`server.listen()`][] from [`net.Server`][].
See [`http.Server#maxHeadersCount`][].
### server.headersTimeout
- {number} **Default:** `40000`
See [`http.Server#headersTimeout`][].
### server.setTimeout([msecs][, callback])
<!-- YAML
added: v0.11.2
@ -367,9 +369,9 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p
[`Agent`]: #https_class_https_agent
[`URL`]: url.html#url_the_whatwg_url_api
[`http.Agent`]: http.html#http_class_http_agent
[`http.Server#headersTimeout`]: http.html#http_server_headerstimeout
[`http.Server#keepAliveTimeout`]: http.html#http_server_keepalivetimeout
[`http.Server#maxHeadersCount`]: http.html#http_server_maxheaderscount
[`http.Server#headersTimeout`]: http.html#http_server_headerstimeout
[`http.Server#setTimeout()`]: http.html#http_server_settimeout_msecs_callback
[`http.Server#timeout`]: http.html#http_server_timeout
[`http.Server`]: http.html#http_class_http_server