mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
Add Conditions to Ensure Bind Succeeds with Transfer-Encoding: chunked
(#2717)
* Add conditions to ensure Bind succeeds with `Transfer-Encoding: chunked`. * Revert the ContentLength conditions for BindBody
This commit is contained in:
committed by
GitHub
parent
3b017855b4
commit
0368ed87f2
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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user