From 48f58d0669606aed737f9aec069b7bde357e8917 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Mon, 22 Aug 2022 06:54:08 +0300 Subject: [PATCH] Fix wrong stream name request --- cmd/streams/handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/streams/handlers.go b/cmd/streams/handlers.go index 36f47b33..c9fa2eeb 100644 --- a/cmd/streams/handlers.go +++ b/cmd/streams/handlers.go @@ -19,6 +19,9 @@ func HandleFunc(scheme string, handler Handler) { func HasProducer(url string) bool { i := strings.IndexByte(url, ':') + if i <= 0 { // TODO: i < 4 ? + return false + } return handlers[url[:i]] != nil }