From 838fb950593c1be20753c129352ac0294baa8e88 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 23 Mar 2019 09:37:32 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/26881 Fixes: https://github.com/https://github.com/nodejs/node/issues/26862 Reviewed-By: Luigi Pinca Reviewed-By: Yongsheng Zhang Reviewed-By: Gireesh Punathil Reviewed-By: Daijiro Wachi --- test/sequential/test-https-connect-localport.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-https-connect-localport.js b/test/sequential/test-https-connect-localport.js index d703d2813cd01a..67b56c7d7d6b80 100644 --- a/test/sequential/test-https-connect-localport.js +++ b/test/sequential/test-https-connect-localport.js @@ -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,