From 5e9d81b507e0beb46b3812e21566bfef79c87af4 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 12 Dec 2019 15:27:09 -0700 Subject: try_files, rewrite: allow query string in try_files (fix #2891) Also some minor cleanup/improvements discovered along the way --- modules/caddyhttp/rewrite/rewrite.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'modules/caddyhttp/rewrite') diff --git a/modules/caddyhttp/rewrite/rewrite.go b/modules/caddyhttp/rewrite/rewrite.go index a142080..adb90f4 100644 --- a/modules/caddyhttp/rewrite/rewrite.go +++ b/modules/caddyhttp/rewrite/rewrite.go @@ -190,11 +190,6 @@ func (rep replacer) do(r *http.Request, repl caddy.Replacer) bool { r.URL.Path = strings.Replace(oldPath, find, replace, lim) r.URL.RawQuery = strings.Replace(oldQuery, find, replace, lim) - // changed := r.URL.Path != oldPath && r.URL.RawQuery != oldQuery - // if changed { - // r.RequestURI = r.URL.RequestURI() - // } - return r.URL.Path != oldPath && r.URL.RawQuery != oldQuery } -- cgit v1.2.3