Skip to content

Commit 340ca4d

Browse files
nicksia-vgwruyadorno
authored andcommitted
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: #44163 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Ricky Zhou <[email protected]>
1 parent 04007f2 commit 340ca4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ function storeHTTPOptions(options) {
425425
}
426426

427427
if (this.requestTimeout > 0 && this.headersTimeout > 0 && this.headersTimeout >= this.requestTimeout) {
428-
throw new codes.ERR_OUT_OF_RANGE('headersTimeout', '>= requestTimeout', headersTimeout);
428+
throw new codes.ERR_OUT_OF_RANGE('headersTimeout', '< requestTimeout', headersTimeout);
429429
}
430430

431431
const keepAliveTimeout = options.keepAliveTimeout;

0 commit comments

Comments
 (0)