]> Cypherpunks repositories - gostls13.git/commit
net/http: avoid appending an existing trailing slash to path again
authorJes Cok <xigua67damn@gmail.com>
Tue, 25 Jun 2024 17:35:13 +0000 (01:35 +0800)
committerJonathan Amsterdam <jba@google.com>
Fri, 28 Jun 2024 17:01:13 +0000 (17:01 +0000)
commit773767def0e0f29584a69bd760430167b7479d7d
tree2cf134fba39bf82190eadf08c3567255839b7bfa
parent7f90b960a9711b51bf36f49be4274ac5f7e86a95
net/http: avoid appending an existing trailing slash to path again

This CL is similar to CL 562557, and it takes over CL 594175.

While here, unrelatedly remove mapKeys function, use slices.Sorted(maps.Keys(ms))
to simplify code.

Fixes #67657

Change-Id: Id8b99216f87a6dcfd6d5fa61407b515324c79112
Reviewed-on: https://go-review.googlesource.com/c/go/+/594737
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
src/net/http/routing_tree_test.go
src/net/http/serve_test.go
src/net/http/server.go