Skip to content

Commit

Permalink
Update request.go
Browse files Browse the repository at this point in the history
Request with ContentLength instead of Transfer-Encoding chunked
  • Loading branch information
olivier4576 authored and MEHEUST Olivier committed Sep 8, 2023
1 parent 29ee989 commit f10afc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (r *Request) setBodyReader(body io.Reader) error {
switch v := body.(type) {
case *strings.Reader:
r.ContentLength = int64(v.Len())
case *bytes.Buffer:
case *bytes.Reader:
r.ContentLength = int64(v.Len())
}
}
Expand Down

0 comments on commit f10afc5

Please sign in to comment.