mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-01 15:55:49 +03:00
drop attempt to parse form in limiter, conflicts with form body
This commit is contained in:
@@ -51,10 +51,6 @@ func maxReqSizeHandler(maxSize int64) func(next http.Handler) http.Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
r.Body = http.MaxBytesReader(w, r.Body, maxSize)
|
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)
|
next.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
return http.HandlerFunc(fn)
|
return http.HandlerFunc(fn)
|
||||||
|
|||||||
Reference in New Issue
Block a user