Skip to content

Commit

Permalink
馃悰 fix issue with strange messages in the http body when max request
Browse files Browse the repository at this point in the history
reached

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
  • Loading branch information
rustatian committed Mar 16, 2021
1 parent a30d837 commit 584f9ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/http/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,10 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

if size > int64(h.maxRequestSize) {
h.sendEvent(ErrorEvent{Request: r, Error: errors.E(op, errors.Str("request body max size is exceeded")), start: start, elapsed: time.Since(start)})
http.Error(w, errors.E(op, errors.Str("request body max size is exceeded")).Error(), 500)
return
}

h.sendEvent(ErrorEvent{Request: r, Error: errors.E(op, errors.Str("request body max size is exceeded")), start: start, elapsed: time.Since(start)})
return
}
}

Expand Down

0 comments on commit 584f9ad

Please sign in to comment.