net/http: ServeMux.Handler returns wrong pattern with trailing-slash redirection handler #73688
Labels
BugReport
Issues describing a possible bug in the Go implementation.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
ServeMux.Handler should return patterns as passed to Handle.
However, if returning a trailing-slash redirection handler (but not if returning a request sanitizing redirection handler), non-
...
wildcards are replaced with the corresponding segment from the path.The following code
prints
/foo/
instead of/{x}/
.https://go.dev/play/p/XQjZOXTLVTQ
The text was updated successfully, but these errors were encountered: