mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-31 12:15:56 -04:00
replace strings.Split for SplitN
This commit is contained in:
parent
e486c9c6e7
commit
54355d8fb3
@ -21,7 +21,7 @@ func To(fs http.FileSystem, r *http.Request, to string, replacer httpserver.Repl
|
|||||||
query := ""
|
query := ""
|
||||||
for _, v := range tos {
|
for _, v := range tos {
|
||||||
t = replacer.Replace(v)
|
t = replacer.Replace(v)
|
||||||
tparts := strings.Split(t, "?")
|
tparts := strings.SplitN(t, "?", 2)
|
||||||
t = path.Clean(tparts[0])
|
t = path.Clean(tparts[0])
|
||||||
|
|
||||||
if len(tparts) > 1 {
|
if len(tparts) > 1 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user