drop attempt to parse form in limiter, conflicts with form body

This commit is contained in:
Umputun 2021-06-07 16:20:23 -05:00
parent fb57a6bb45
commit 687e78e87b

View File

@ -51,10 +51,6 @@ func maxReqSizeHandler(maxSize int64) func(next http.Handler) http.Handler {
}
r.Body = http.MaxBytesReader(w, r.Body, maxSize)
if err := r.ParseForm(); err != nil {
http.Error(w, "Request Entity Too Large", http.StatusRequestEntityTooLarge)
return
}
next.ServeHTTP(w, r)
}
return http.HandlerFunc(fn)