Resolve hostnames at the client dial
- http, https, TLS and HTTP/2 clients now resolve the hostname before connecting. A client that dialed by name got ENOTFOUND regardless of the name — only literal addresses worked, which is most of what a from-scratch client writes. - Only the dial takes the address. The original name stays on the request, which is what the Host header carries and what SNI and certificate verification see, so a resolved dial does not weaken the TLS check. - node:net's own connect surface stays resolver-less: Node's async lookup semantics there are a separate piece of work, so `net.connect(port, hostname)` still refuses to resolve.
C
Chris Tate committed
46643230d899657ef47df079b2989c45c0b96f17
Parent: 701e279