diff --git a/mux.go b/mux.go index f126a602..3c52fa19 100644 --- a/mux.go +++ b/mux.go @@ -179,19 +179,7 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) { path = req.URL.EscapedPath() } // Clean path to canonical form and redirect. - if p := cleanPath(path); p != path { - - // Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query. - // This matches with fix in go 1.2 r.c. 4 for same problem. Go Issue: - // http://code.google.com/p/go/issues/detail?id=5252 - url := *req.URL - url.Path = p - p = url.String() - - w.Header().Set("Location", p) - w.WriteHeader(http.StatusMovedPermanently) - return - } + req.URL.Path = cleanPath(path) } var match RouteMatch var handler http.Handler