Skip to content

Commit

Permalink
discard unauthorized response body (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayth authored Nov 18, 2020
1 parent ab0cc61 commit b55a7e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions v8/spnego/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func (c *Client) Do(req *http.Request) (resp *http.Response, err error) {
// Refresh the body reader so the body can be sent again
req.Body = ioutil.NopCloser(&body)
}
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()
return c.Do(req)
}
return resp, err
Expand Down

0 comments on commit b55a7e0

Please sign in to comment.