[client] Fold the scheme case here too, like util does (review item 6)

profilemanager.SameServiceURL compared the scheme with ==, util.SameServiceURL
with EqualFold. No observable difference — net/url lowercases the scheme when
it parses, and both functions take parsed URLs — but two functions of the same
name with two different rules is a trap for whoever reads one and assumes the
other.
This commit is contained in:
riccardom
2026-09-11 14:53:15 +02:00
parent 07dc9cb1c8
commit 36bbef21cd
+1 -1
View File
@@ -1009,7 +1009,7 @@ func SameServiceURL(a, b *url.URL) bool {
return a == b
}
return a.Scheme == b.Scheme &&
return strings.EqualFold(a.Scheme, b.Scheme) &&
strings.EqualFold(a.Hostname(), b.Hostname()) &&
util.ServiceURLPort(a) == util.ServiceURLPort(b)
}