]> Cypherpunks repositories - gostls13.git/commit
net/http: avoid redundant installation of HTTP/2 support in transport
authorDamien Neil <dneil@google.com>
Sat, 23 Nov 2024 01:10:01 +0000 (17:10 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 25 Nov 2024 18:39:27 +0000 (18:39 +0000)
commitfb5fa2a839ef0ea9952e47f6d0e05b51a5a51a8d
treeff2d1adfe2b5e60b5f5dc45fd5fd6d0699a95159
parent733df2bc0af0f73d7bc9ee49a0d805b010293212
net/http: avoid redundant installation of HTTP/2 support in transport

Previously, we'd skip installing the bundled HTTP/2 support
if Transport.TLSNextProto is non-nil.

With the addition of the Transport.Protocols field, we'll
install HTTP/2 if Protocols contains HTTP2, even if TLSNextProto
is non-nil. However, we shouldn't do so if it already contains an
"h2" entry.

Change-Id: Ib086473bb52f1b76d83b1df961d41360c605832c
Reviewed-on: https://go-review.googlesource.com/c/go/+/631395
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
src/net/http/transport.go