0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-20 22:52:58 -05:00

replace strings.Split for SplitN

This commit is contained in:
Pedro Nasser 2016-06-16 10:03:31 -03:00
parent e486c9c6e7
commit 54355d8fb3

View file

@ -21,7 +21,7 @@ func To(fs http.FileSystem, r *http.Request, to string, replacer httpserver.Repl
query := ""
for _, v := range tos {
t = replacer.Replace(v)
tparts := strings.Split(t, "?")
tparts := strings.SplitN(t, "?", 2)
t = path.Clean(tparts[0])
if len(tparts) > 1 {