From 250679ac3bbe8aacc298a3881057843433953e52 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 17 Feb 2024 10:48:48 +0200 Subject: [PATCH] return 413 if request body is too big --- fed/inbox.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fed/inbox.go b/fed/inbox.go index 86edda5c..506ede48 100644 --- a/fed/inbox.go +++ b/fed/inbox.go @@ -41,6 +41,7 @@ func (l *Listener) handleInbox(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(io.LimitReader(r.Body, l.Config.MaxRequestBodySize)) if err != nil { + w.WriteHeader(http.StatusRequestEntityTooLarge) return }