http: use string contains instead of index
This commit is contained in:
parent
162aba60eb
commit
946e84d194
1 changed files with 1 additions and 1 deletions
|
@ -297,7 +297,7 @@ func parseName(base *url.URL, name string) (string, error) {
|
||||||
}
|
}
|
||||||
// check it doesn't have URL parameters
|
// check it doesn't have URL parameters
|
||||||
uStr := u.String()
|
uStr := u.String()
|
||||||
if strings.Index(uStr, "?") >= 0 {
|
if strings.Contains(uStr, "?") {
|
||||||
return "", errFoundQuestionMark
|
return "", errFoundQuestionMark
|
||||||
}
|
}
|
||||||
// check that this is going back to the same host and scheme
|
// check that this is going back to the same host and scheme
|
||||||
|
|
Loading…
Reference in a new issue