]> Cypherpunks repositories - gostls13.git/commit
net/http: fix ServeMux.Handler on trailing-slash redirect
authorJonathan Amsterdam <jba@google.com>
Sat, 17 May 2025 23:36:06 +0000 (19:36 -0400)
committerJonathan Amsterdam <jba@google.com>
Mon, 19 May 2025 19:25:47 +0000 (12:25 -0700)
commit3602cec3af6083d095729f3db8493a226b9273c3
tree379e68dff68663c0c5ae722d5884e1f4a7613111
parentd52679006c8e08875fac92aca1f723fce488d0d2
net/http: fix ServeMux.Handler on trailing-slash redirect

When a match involves a trailing-slash redirect,  ServeMux.Handler now
returns the pattern that matched.

Fixes #73688.

Change-Id: I682d9cc9a3628bed8bf21139b98369ffa6c53792
Reviewed-on: https://go-review.googlesource.com/c/go/+/673815
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/http/serve_test.go
src/net/http/server.go