net/http: introduce DialerAndTLSConfigSupportsHTTP2 in Transport
Even when a custom TLS config or custom dialer is specified, enables HTTP/2 if DialerAndTLSConfigSupportsHTTP2 is true. By this change, avoid automatically enabling HTTP/2 if DialContext is set. This change also ensures that DefaultTransport still automatically enable HTTP/2 as discussed in #14391. Updates #14391 Fixes #27011 Change-Id: Icc46416810bee61dbd65ebc96468335030b80573 Reviewed-on: https://go-review.googlesource.com/c/go/+/130256Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Kunpei Sakai <namusyaka@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment