aboutsummaryrefslogtreecommitdiff
path: root/src/testing/example.go
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2025-03-04 15:20:28 -0800
committerGopher Robot <gobot@golang.org>2025-03-04 16:56:00 -0800
commit350118666d75445761bef5c45e681415e6d1b326 (patch)
tree7f282972f103330afe04df64cf7cfe36f8088e6c /src/testing/example.go
parenta1889554fc3e0c15b4a9870b49bf3a0252f80688 (diff)
downloadgo-350118666d75445761bef5c45e681415e6d1b326.tar.xz
net/http: don't modify caller's tls.Config.NextProtos
Clone the input slice before adjusting NextProtos to add or remove "http/1.1" and "h2" entries, so as not to modify a slice that the caller might be using. (We clone the tls.Config that contains the slice, but that's a shallow clone.) Fixes #72100 Change-Id: I9f228b8fb6f6f2ca5023179ec114929c002dbda9 Reviewed-on: https://go-review.googlesource.com/c/go/+/654875 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/example.go')
0 files changed, 0 insertions, 0 deletions