Skip to content

Commit f10afc5

Browse files
olivier4576MEHEUST Olivier
authored andcommitted
Update request.go
Request with ContentLength instead of Transfer-Encoding chunked
1 parent 29ee989 commit f10afc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (r *Request) setBodyReader(body io.Reader) error {
113113
switch v := body.(type) {
114114
case *strings.Reader:
115115
r.ContentLength = int64(v.Len())
116-
case *bytes.Buffer:
116+
case *bytes.Reader:
117117
r.ContentLength = int64(v.Len())
118118
}
119119
}

0 commit comments

Comments
 (0)