Fixes panic on round tripper when TLS under a proxy

This commit is contained in:
Fabiano Franz 2016-05-16 17:56:23 -03:00
parent 835a2577f8
commit 5940040c96

View File

@ -125,6 +125,10 @@ func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) {
return nil, err
}
if s.tlsConfig == nil {
s.tlsConfig = &tls.Config{}
}
if len(s.tlsConfig.ServerName) == 0 {
s.tlsConfig.ServerName = host
}