From 5940040c96d49f5c894d1117ebea572fea73110a Mon Sep 17 00:00:00 2001 From: Fabiano Franz Date: Mon, 16 May 2016 17:56:23 -0300 Subject: [PATCH] Fixes panic on round tripper when TLS under a proxy --- pkg/util/httpstream/spdy/roundtripper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/util/httpstream/spdy/roundtripper.go b/pkg/util/httpstream/spdy/roundtripper.go index ca7e9370ecf..6091c4e4b10 100644 --- a/pkg/util/httpstream/spdy/roundtripper.go +++ b/pkg/util/httpstream/spdy/roundtripper.go @@ -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 }