diff --git a/client.go b/client.go index 2efd835..3be04aa 100644 --- a/client.go +++ b/client.go @@ -9,6 +9,7 @@ import ( "context" "crypto/tls" "errors" + "fmt" "io" "io/ioutil" "net" @@ -185,6 +186,12 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h return nil, nil, errMalformedURL } + for _, proto := range d.TLSClientConfig.NextProtos { + if proto != "http/1.1" { + return nil, nil, fmt.Errorf("protocol %q is currently not supported", proto) + } + } + req := &http.Request{ Method: http.MethodGet, URL: u,