You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
http.Handle("/test///a", Handler)
And visit http://localhost/test/%2f/a
What is the expected output?
Handler should be called.
What do you see instead?
The browser is redirected to /test/a, and a 404 error
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
linux
Which version are you using? (run 'go version')
go version devel +0d9fd828f099 Wed Jan 30 17:26:22 2013 +1100 linux/amd64.
Please provide any additional information below.
if p := cleanPath(path); p != path {
_, pattern = mux.handler(r.Host, p)
return RedirectHandler(p, StatusMovedPermanently), pattern
}
If path is a raw path before unescape,/test/%2f/a can be handled correctly without
redirect. mux.match can use r.URL.Path as before.
The text was updated successfully, but these errors were encountered:
The HTTP server has no way to distinguish /test/%2f/a from /test///a. There is a pending
issue to document this property in net/url better. I am marking this issue a duplicate
of that one.
by hongruiqi:
The text was updated successfully, but these errors were encountered: