Fix empty body error in mirror
This commit is contained in:
parent
2b73860ea5
commit
0ac6f80b50
2 changed files with 15 additions and 2 deletions
|
@ -204,7 +204,7 @@ func newReusableRequest(req *http.Request, maxBodySize int64) (*reusableRequest,
|
|||
if req == nil {
|
||||
return nil, nil, errors.New("nil input request")
|
||||
}
|
||||
if req.Body == nil {
|
||||
if req.Body == nil || req.ContentLength == 0 {
|
||||
return &reusableRequest{req: req}, nil, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue