From f10afc50fbae781b1d2b8ea1c0f91554cc527659 Mon Sep 17 00:00:00 2001 From: olivier4576 <75396422+olivier4576@users.noreply.github.com> Date: Wed, 2 Dec 2020 23:11:41 +0100 Subject: [PATCH] Update request.go Request with ContentLength instead of Transfer-Encoding chunked --- request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request.go b/request.go index fd511ab2..d0ba10d2 100644 --- a/request.go +++ b/request.go @@ -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()) } }