From e0c4c97a465e78457fc19b130ccfebececc45bcf Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 1 Nov 2019 19:08:39 +0700 Subject: [PATCH] correctly handle nil tls.Configs in the http09.RoundTripper --- interop/http09/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interop/http09/client.go b/interop/http09/client.go index 1cee2320..8edcd67c 100644 --- a/interop/http09/client.go +++ b/interop/http09/client.go @@ -41,7 +41,10 @@ func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { } c, ok := r.clients[hostname] if !ok { - tlsConf := r.TLSClientConfig.Clone() + tlsConf := &tls.Config{} + if r.TLSClientConfig != nil { + tlsConf = r.TLSClientConfig.Clone() + } tlsConf.NextProtos = []string{h09alpn} c = &client{ hostname: hostname,