set nextprotos

This commit is contained in:
Asim Aslam 2019-05-24 17:05:31 +01:00
parent 0a3df1b2f3
commit f5d37d92af

View File

@ -444,6 +444,7 @@ func (h *httpTransport) Dial(addr string, opts ...DialOption) (Client, error) {
InsecureSkipVerify: true,
}
}
config.NextProtos = []string{"http/1.1"}
conn, err = newConn(func(addr string) (net.Conn, error) {
return tls.DialWithDialer(&net.Dialer{Timeout: dopts.Timeout}, "tcp", addr, config)
})(addr)