mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user