Skip to content

Commit

Permalink
handle /events/, fix return
Browse files Browse the repository at this point in the history
  • Loading branch information
Novgorodov Igor, PMK-TV-OP authored and Novgorodov Igor, PMK-TV-OP committed Jun 7, 2019
1 parent 7179dd0 commit 9bf7a54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.4.1
2 changes: 2 additions & 0 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit 9bf7a54

Please sign in to comment.