http,https: increase server headers timeout
Fixes: https://github.com/nodejs/node/issues/24980 Refs: https://github.com/nodejs/node/commit/eb43bc04b1 PR-URL: https://github.com/nodejs/node/pull/30071 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
9c460e10d1
commit
e17403ede3
@ -1107,7 +1107,7 @@ Stops the server from accepting new connections. See [`net.Server.close()`][].
|
||||
added: v11.3.0
|
||||
-->
|
||||
|
||||
* {number} **Default:** `40000`
|
||||
* {number} **Default:** `60000`
|
||||
|
||||
Limit the amount of time the parser will wait to receive the complete HTTP
|
||||
headers.
|
||||
|
@ -94,7 +94,7 @@ See [`server.close()`][`http.close()`] from the HTTP module for details.
|
||||
added: v11.3.0
|
||||
-->
|
||||
|
||||
* {number} **Default:** `40000`
|
||||
* {number} **Default:** `60000`
|
||||
|
||||
See [`http.Server#headersTimeout`][].
|
||||
|
||||
|
@ -348,7 +348,7 @@ function Server(options, requestListener) {
|
||||
this.timeout = 0;
|
||||
this.keepAliveTimeout = 5000;
|
||||
this.maxHeadersCount = null;
|
||||
this.headersTimeout = 40 * 1000; // 40 seconds
|
||||
this.headersTimeout = 60 * 1000; // 60 seconds
|
||||
}
|
||||
ObjectSetPrototypeOf(Server.prototype, net.Server.prototype);
|
||||
ObjectSetPrototypeOf(Server, net.Server);
|
||||
|
@ -77,7 +77,7 @@ function Server(opts, requestListener) {
|
||||
this.timeout = 0;
|
||||
this.keepAliveTimeout = 5000;
|
||||
this.maxHeadersCount = null;
|
||||
this.headersTimeout = 40 * 1000; // 40 seconds
|
||||
this.headersTimeout = 60 * 1000; // 60 seconds
|
||||
}
|
||||
ObjectSetPrototypeOf(Server.prototype, tls.Server.prototype);
|
||||
ObjectSetPrototypeOf(Server, tls.Server);
|
||||
|
@ -17,8 +17,8 @@ const headers =
|
||||
const server = createServer(common.mustNotCall());
|
||||
let sendCharEvery = 1000;
|
||||
|
||||
// 40 seconds is the default
|
||||
assert.strictEqual(server.headersTimeout, 40 * 1000);
|
||||
// 60 seconds is the default
|
||||
assert.strictEqual(server.headersTimeout, 60 * 1000);
|
||||
|
||||
// Pass a REAL env variable to shortening up the default
|
||||
// value which is 40s otherwise this is useful for manual
|
||||
|
@ -27,8 +27,8 @@ const server = createServer({
|
||||
|
||||
let sendCharEvery = 1000;
|
||||
|
||||
// 40 seconds is the default
|
||||
assert.strictEqual(server.headersTimeout, 40 * 1000);
|
||||
// 60 seconds is the default
|
||||
assert.strictEqual(server.headersTimeout, 60 * 1000);
|
||||
|
||||
// Pass a REAL env variable to shortening up the default
|
||||
// value which is 40s otherwise
|
||||
|
Loading…
x
Reference in New Issue
Block a user