https: use `servername` in agent key
authorFedor Indutny <fedor@indutny.com>
Tue, 22 Dec 2015 18:22:52 +0000 (13:22 -0500)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:32 +0000 (11:52 -0800)
commit751fbd84dd200d2462eefe854316055332819a4e
treeca75e99f8330155b02043707adb7dd27607eb6f3
parent44ee33f9458b32aa3f239596d527ce6114b326ca
https: use `servername` in agent key

https requests with different SNI values should not be sent over the
same connection, even if the `host` is the same. Server may want to
present different certificate or route the incoming TLS connection
differently, depending on the received servername extension.

Fix: https://github.com/nodejs/node/issues/3940
PR-URL: https://github.com/nodejs/node/pull/4389
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
lib/https.js
test/parallel/test-https-agent-sni.js [new file with mode: 0644]