From 9bf7a54b21a486db5145b6d0c5d18bbf5ca42e81 Mon Sep 17 00:00:00 2001 From: "Novgorodov Igor, PMK-TV-OP" Date: Fri, 7 Jun 2019 10:06:25 +0200 Subject: [PATCH] handle /events/, fix return --- VERSION | 2 +- input.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 88c5fb8..347f583 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.0 +1.4.1 diff --git a/input.go b/input.go index 32ab1c3..a9e6250 100644 --- a/input.go +++ b/input.go @@ -88,6 +88,7 @@ func newInput(c *inputCfg) (i *input, err error) { mux := http.NewServeMux() mux.HandleFunc("/events", i.handleHTTPRequest) + mux.HandleFunc("/events/", i.handleHTTPRequest) i.listenerWS = &http.Server{ Handler: mux, @@ -326,6 +327,7 @@ func (i *input) handleHTTPEvent(w http.ResponseWriter, r *http.Request) { ev, err := eventFromJSON(buf) if err != nil { i.Errorf("%s: Unable to parse event JSON: %s", r.RemoteAddr, err) + return } i.sendEvents([]*Event{ev})