Skip to content

Commit 838fb95

Browse files
Trotttargos
authored andcommitted
test: replace localhost IP with 'localhost' for TLS conformity
test-https-connect-localport currently causes a runtime deprecation warning: "[DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version." Change IP usage to the string 'localhost' instead. PR-URL: #26881 Fixes: #26862 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
1 parent 011c205 commit 838fb95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sequential/test-https-connect-localport.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const assert = require('assert');
1515
}, common.mustCall(function(req, res) {
1616
this.close();
1717
res.end();
18-
})).listen(0, common.localhostIPv4, common.mustCall(function() {
18+
})).listen(0, 'localhost', common.mustCall(function() {
1919
const port = this.address().port;
2020
const req = https.get({
21-
host: common.localhostIPv4,
21+
host: 'localhost',
2222
pathname: '/',
2323
port,
2424
family: 4,

0 commit comments

Comments
 (0)