Skip to content

Commit a49e4fb

Browse files
authored
Update request.go
Request with ContentLength instead of Transfer-Encoding chunked
1 parent 21064b9 commit a49e4fb

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
@@ -115,7 +115,7 @@ func (r *Request) setBodyReader(body io.Reader) error {
115115
switch v := body.(type) {
116116
case *strings.Reader:
117117
r.ContentLength = int64(v.Len())
118-
case *bytes.Buffer:
118+
case *bytes.Reader:
119119
r.ContentLength = int64(v.Len())
120120
}
121121
}

0 commit comments

Comments
 (0)