From 2aa8768aed165d97bf6e1fbe9d46987b08a788e6 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sun, 23 Jan 2022 02:40:24 +0300 Subject: [PATCH] reorder path checking, priority in internal routes Signed-off-by: Vasiliy Tolstov --- http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http.go b/http.go index 8f34da6..a7cf7e0 100644 --- a/http.go +++ b/http.go @@ -453,12 +453,12 @@ func (h *httpServer) Start() error { switch { case handler == nil && h.hd == nil: handler = h + case len(h.handlers) > 0 && h.hd != nil: + handler = h case handler == nil && h.hd != nil: if hdlr, ok := h.hd.Handler().(http.Handler); ok { handler = hdlr } - case len(h.handlers) > 0 && h.hd != nil: - handler = h } if handler == nil { -- 2.45.2