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: #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>
  • Loading branch information
Trott authored and targos committed Mar 27, 2019
1 parent 011c205 commit 838fb95
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 838fb95

Please sign in to comment.