On 2/8/24 11:30, Jason Phillips wrote:
Can you create a small self-contained program that reproduces the
issue? The following program returns 404 locally, as I'd expect, but
does get killed in the Go playground: https://go.dev/play/p/FigBLK8KrAK
Perhaps a simpler reproduction that's runnable on the playground:
https://go.dev/play/p/gmQGJsyNCT6
This returns 301 with a Location of /x/. Note the trailing slash in the
mux pattern, which was missing in your example.
Perhaps there's an issue with the Playground networking implementation
that's incompatible with the 1.22 changes?
On Thursday, February 8, 2024 at 12:03:46 PM UTC-5 Patricia Decker wrote:
I haven't played around with it yet, but have you tried to
separately register /something/ ?
mux := http.NewServeMux()
mux.HandleFunc("/something/", func...)
mux.HandleFunc("/something/{id}/{$}", func...)
On Wednesday, February 7, 2024 at 1:21:00 PM UTC-8 Péter Szarvas
wrote:
Hello,
I noticed if you set up a route like /something/{id}/{$}, it
results in an infinite loop if I navigate to /someting/ (with
the trailing slash). I got a redirect to Location:
/something/, and so on. Finally the page breaks after multiple
rounds.
Example:
mux := http.NewServeMux()
mux.HandleFunc("/something/{id}/{$}", func...))
Should I raise and issue or am I doing something wrong here?
Thanks,
Peter
--
You received this message because you are subscribed to the Google
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/445d31e9-e9ce-407a-985c-ad448da9f786n%40googlegroups.com
<https://groups.google.com/d/msgid/golang-nuts/445d31e9-e9ce-407a-985c-ad448da9f786n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Kyle
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/85cdc8ae-66cb-45e0-8ba5-b0380cee9df1%40pobox.com.