mirror of
https://github.com/labstack/echo.git
synced 2024-11-24 08:22:21 +02:00
fix(bind body): content-length can be -1
This commit is contained in:
parent
5d98929328
commit
c4410fe0b8
2
bind.go
2
bind.go
@ -67,7 +67,7 @@ func (b *DefaultBinder) BindQueryParams(c Context, i interface{}) error {
|
||||
// See MIMEMultipartForm: https://golang.org/pkg/net/http/#Request.ParseMultipartForm
|
||||
func (b *DefaultBinder) BindBody(c Context, i interface{}) (err error) {
|
||||
req := c.Request()
|
||||
if req.ContentLength == 0 {
|
||||
if req.ContentLength <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user