Skip to content

Commit

Permalink
fix: check for EOF body in upstream influxdb listener
Browse files Browse the repository at this point in the history
Throughout the influx parsing logic there are checks for receiving an
EOF body. When received the parsing logic returns. When content is gzip
we check for any error and return that error, but do not do any specific
chesk for EOF.

Fixes: #10900
  • Loading branch information
powersj committed Apr 12, 2022
1 parent bed3b4b commit 23cd3ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/inputs/influxdb_listener/influxdb_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ func (h *InfluxDBListener) handleWriteUpstreamParser(res http.ResponseWriter, re
var err error
body, err = gzip.NewReader(body)
if err != nil {
if err == influx_upstream.ErrEOF {
return
}
h.Log.Debugf("Error decompressing request body: %v", err.Error())
if err := badRequest(res, err.Error()); err != nil {
h.Log.Debugf("error in bad-request: %v", err)
Expand Down

0 comments on commit 23cd3ec

Please sign in to comment.