mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
http: fix error message when specifying headerTimeout for createServer
This change fixes the message on the error received when calling http.createServer(...) with a header timeout greater than the request timeout is incorrect. The validation requires that the header timeout is lower than the request timeout, but the error message asks for the opposite. PR-URL: https://github.com/nodejs/node/pull/44163 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
This commit is contained in:
parent
8b0e5b19bd
commit
b4279240f5
@ -420,7 +420,7 @@ function storeHTTPOptions(options) {
|
||||
}
|
||||
|
||||
if (this.requestTimeout > 0 && this.headersTimeout > 0 && this.headersTimeout >= this.requestTimeout) {
|
||||
throw new codes.ERR_OUT_OF_RANGE('headersTimeout', '>= requestTimeout', headersTimeout);
|
||||
throw new codes.ERR_OUT_OF_RANGE('headersTimeout', '< requestTimeout', headersTimeout);
|
||||
}
|
||||
|
||||
const keepAliveTimeout = options.keepAliveTimeout;
|
||||
|
Loading…
Reference in New Issue
Block a user