Skip to content

Commit

Permalink
Merge pull request #558 from nkryuchkov/fix/empty-req-body-error
Browse files Browse the repository at this point in the history
Fix empty request body error
  • Loading branch information
jdknives authored Oct 19, 2020
2 parents 43b289d + 0fd9219 commit 22a265c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/httpauth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func (c *Client) do(client *http.Client, req *http.Request) (*http.Response, err
if err := resp.Body.Close(); err != nil {
log.WithError(err).Warn("Failed to close HTTP response body")
}

req.Body = ioutil.NopCloser(bytes.NewBuffer(body))

resp, err = c.doRequest(client, req, body)
if err != nil {
return nil, err
Expand Down

0 comments on commit 22a265c

Please sign in to comment.