test: replace localhost IP with 'localhost' for TLS conformity · nodejs/node@838fb95 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Commit 838fb95
authored and
committed
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: #26862Reviewed-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
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -15,10 +15,10 @@ const assert = require('assert'); | ||
15 | 15 | }, common.mustCall(function(req, res) { |
16 | 16 | this.close(); |
17 | 17 | res.end(); |
18 | -})).listen(0, common.localhostIPv4, common.mustCall(function() { | |
18 | +})).listen(0, 'localhost', common.mustCall(function() { | |
19 | 19 | const port = this.address().port; |
20 | 20 | const req = https.get({ |
21 | -host: common.localhostIPv4, | |
21 | +host: 'localhost', | |
22 | 22 | pathname: '/', |
23 | 23 | port, |
24 | 24 | family: 4, |