summaryrefslogtreecommitdiff
path: root/plugins/http
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/http')
-rw-r--r--plugins/http/handler.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/http/handler.go b/plugins/http/handler.go
index 11d9b827..b7c6f1fa 100644
--- a/plugins/http/handler.go
+++ b/plugins/http/handler.go
@@ -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
}
}