Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

http: use string contains instead of index

albertony946e84d19490
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