Skip to content

Commit

Permalink
fix(bind body): content-length can be -1
Browse files Browse the repository at this point in the history
  • Loading branch information
pham vinh dat authored and aldas committed Nov 22, 2024
1 parent 5d98929 commit c4410fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c4410fe

Please sign in to comment.