aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-https-simple.js
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-06-02 18:11:48 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2019-06-17 11:58:26 +0200
commit574985cec8d96ee33be957f247941ad2c9e522bf (patch)
tree76f362d7bc75173ed329694ea61b750512ef39fd /test/parallel/test-https-simple.js
parent7cb89819b5681b72c38ea1957c681243329b93fd (diff)
downloadandroid-node-v8-574985cec8d96ee33be957f247941ad2c9e522bf.tar.gz
android-node-v8-574985cec8d96ee33be957f247941ad2c9e522bf.tar.bz2
android-node-v8-574985cec8d96ee33be957f247941ad2c9e522bf.zip
https: do not automatically use invalid servername
Stop automatically setting servername in https.request() if the target host is specified with an IP address. Doing so is invalid, and triggers a deprecation warning. It is still possible to send an IP address as a servername if its required, but it needs to be explicity configured, it won't happen automatically. PR-URL: https://github.com/nodejs/node/pull/28209 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/parallel/test-https-simple.js')
-rw-r--r--test/parallel/test-https-simple.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-https-simple.js b/test/parallel/test-https-simple.js
index b6a7c692eb..269db1655e 100644
--- a/test/parallel/test-https-simple.js
+++ b/test/parallel/test-https-simple.js
@@ -29,6 +29,9 @@ if (!common.hasCrypto)
const assert = require('assert');
const https = require('https');
+// Assert that the IP-as-servername deprecation warning does not occur.
+process.on('warning', common.mustNotCall());
+
const options = {
key: fixtures.readKey('agent1-key.pem'),
cert: fixtures.readKey('agent1-cert.pem')