summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/rewrite
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-12-12 15:27:09 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-12-12 15:27:09 -0700
commit5e9d81b507e0beb46b3812e21566bfef79c87af4 (patch)
tree86db08206e19897d13625765f94f870b714d92d7 /modules/caddyhttp/rewrite
parent09a851706541317a36c7cc8ee58152a0a2fa3279 (diff)
try_files, rewrite: allow query string in try_files (fix #2891)
Also some minor cleanup/improvements discovered along the way
Diffstat (limited to 'modules/caddyhttp/rewrite')
-rw-r--r--modules/caddyhttp/rewrite/rewrite.go5
1 files changed, 0 insertions, 5 deletions
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
}