tls: reuse hostname from underlying net.Socket
authorFedor Indutny <fedor.indutny@gmail.com>
Mon, 28 Oct 2013 10:25:27 +0000 (14:25 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Wed, 30 Oct 2013 21:57:17 +0000 (01:57 +0400)
commit5977cba985a4a1831ab5679a7701026f544d9080
treebcd140f2301657ca049ad6e3d161df3a0052494a
parent691b9ebc8c99acce9e8a57373b2b0daae3eadba0
tls: reuse hostname from underlying net.Socket

When `tls.connect()` is called with `socket` option, it should try to
reuse hostname previously passed to `net.connect()` and only after that
fall back to `'localhost'`.

fix #6409
lib/_tls_wrap.js
lib/net.js
test/internet/test-tls-reuse-host-from-socket.js [new file with mode: 0644]