From 442345898802e93b0b884fd0f1c3492e08c34049 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 12 Jul 2024 19:39:56 +0200 Subject: fix: extra data after error parsing query string --- internal/server/mux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/server/mux.go b/internal/server/mux.go index 17445e5..d1a0e38 100644 --- a/internal/server/mux.go +++ b/internal/server/mux.go @@ -107,6 +107,8 @@ func NewMux( page, err = strconv.ParseUint(pg, 10, 64) if err != nil || page == 0 { errorHandler(w, r, "Bad query string", http.StatusBadRequest) + + return } } results, err := index.Search(ctx, source, qs, (page-1)*search.ResultsPerPage) -- cgit 1.4.1