diff --git a/libbeat/common/url.go b/libbeat/common/url.go index 809655bf207..949c4631edf 100644 --- a/libbeat/common/url.go +++ b/libbeat/common/url.go @@ -96,7 +96,7 @@ func ParseURL(raw string, hints ...ParseHint) (*url.URL, error) { hints = append(hints, WithDefaultScheme("http")) } - if parts := strings.SplitN(raw, "://", 2); len(parts) != 2 { + if strings.Index(raw, "://") == -1 { for _, hint := range hints { raw = hint(raw) }