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
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.7.3 darwin/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
What did you do?
http.ServerMux always forces a redirect to cleaned up path (e.g. . and .. removed, empty path components removed, etc..). Specifically, removing an empty component can change the meaning of the URI. In a general case, the handlers should be able to see raw requested URI and decide how the want to handle it. FileSystem handler may want to cleanup paths in this way, but for other cases this is unexpected behavior.
What did you expect to see?
Request for /foo//bar gets redirected to /foo/bar.
What did you see instead?
Request for /foo//bar gets dispatched to the proper handler that matches this URI without cleanup.
The text was updated successfully, but these errors were encountered:
Sorry, it's too late to change this, regardless of whether it's a good idea or not.
It's also a documented feature:
ServeMux also takes care of sanitizing the URL request path, redirecting any request containing . or .. elements or repeated slashes to an equivalent, cleaner URL.
There are hundreds of alternative muxes available. See https://godoc.org/ to find some.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.3 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
What did you do?
http.ServerMux
always forces a redirect to cleaned up path (e.g..
and..
removed, empty path components removed, etc..). Specifically, removing an empty component can change the meaning of the URI. In a general case, the handlers should be able to see raw requested URI and decide how the want to handle it. FileSystem handler may want to cleanup paths in this way, but for other cases this is unexpected behavior.What did you expect to see?
Request for /foo//bar gets redirected to /foo/bar.
What did you see instead?
Request for /foo//bar gets dispatched to the proper handler that matches this URI without cleanup.
The text was updated successfully, but these errors were encountered: