From 946e84d1949088ebc22939132faf373126f4730c Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sun, 23 Jan 2022 22:55:37 +0100 Subject: [PATCH] http: use string contains instead of index --- backend/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/http/http.go b/backend/http/http.go index e97ab4670..ea7b3ac92 100644 --- a/backend/http/http.go +++ b/backend/http/http.go @@ -297,7 +297,7 @@ func parseName(base *url.URL, name string) (string, error) { } // check it doesn't have URL parameters uStr := u.String() - if strings.Index(uStr, "?") >= 0 { + if strings.Contains(uStr, "?") { return "", errFoundQuestionMark } // check that this is going back to the same host and scheme