mirror of
https://github.com/labstack/echo.git
synced 2025-04-21 12:17:04 +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
|
// See MIMEMultipartForm: https://golang.org/pkg/net/http/#Request.ParseMultipartForm
|
||||||
func (b *DefaultBinder) BindBody(c Context, i interface{}) (err error) {
|
func (b *DefaultBinder) BindBody(c Context, i interface{}) (err error) {
|
||||||
req := c.Request()
|
req := c.Request()
|
||||||
if req.ContentLength == 0 {
|
if req.ContentLength <= 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user