mirror of
https://github.com/labstack/echo.git
synced 2025-01-07 23:01:56 +02:00
fix memory leaks #356
This commit is contained in:
parent
68c86e3f90
commit
1c6658e48a
@ -36,6 +36,11 @@ func (b *binder) MaxMemory() int64 {
|
||||
}
|
||||
|
||||
func (b *binder) Bind(r *http.Request, i interface{}) (err error) {
|
||||
if r.Body == nil {
|
||||
err = NewHTTPError(http.StatusBadRequest, "Requesr body can't be nil")
|
||||
return
|
||||
}
|
||||
defer r.Body.Close()
|
||||
ct := r.Header.Get(ContentType)
|
||||
err = ErrUnsupportedMediaType
|
||||
switch {
|
||||
|
Loading…
Reference in New Issue
Block a user