From 36bbef21cd1f6f539f6c46888f623e7e1f22009d Mon Sep 17 00:00:00 2001 From: riccardom Date: Fri, 11 Sep 2026 14:53:15 +0200 Subject: [PATCH] [client] Fold the scheme case here too, like util does (review item 6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- client/internal/profilemanager/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/internal/profilemanager/config.go b/client/internal/profilemanager/config.go index 87c926739..a81632034 100644 --- a/client/internal/profilemanager/config.go +++ b/client/internal/profilemanager/config.go @@ -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) }