Skip to content

Commit

Permalink
test: replace localhost IP with 'localhost' for TLS conformity
Browse files Browse the repository at this point in the history
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: nodejs#26881
Fixes: nodejs#26862
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
  • Loading branch information
Trott committed Mar 24, 2019
1 parent 229759f commit f5969f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sequential/test-https-connect-localport.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const assert = require('assert');
}, common.mustCall(function(req, res) {
this.close();
res.end();
})).listen(0, common.localhostIPv4, common.mustCall(function() {
})).listen(0, 'localhost', common.mustCall(function() {
const port = this.address().port;
const req = https.get({
host: common.localhostIPv4,
host: 'localhost',
pathname: '/',
port,
family: 4,
Expand Down

0 comments on commit f5969f0

Please sign in to comment.