https: certificate validation fails when using servername option
Agent#createSocket() overwrites options.servername leading to a tls.checkServerIdentity() against hostname instead of servername.
I usually disabled connection pooling in that case, but that is not possible anymore as ClientRequest#constructor always sets an agent.
Not sure if this is intentional; Did I overlook something in the changelog?
I provide a PR incl. test for Agent#createSocket() when I get the go ahead.
/cc @indutny - seems like an unambiguous bug to me..
Surely a bug, @skenqbx please go ahead ;) Please submit a test first, though. Just to make sure that we are on the same page.