mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-07-03 04:22:54 -05:00
read full request.Body to reuse http/1 connections
This commit is contained in:
@ -697,7 +697,7 @@ func NewBitbucketAPIResponse(r *http.Response) (*APIResponse, error) {
|
|||||||
|
|
||||||
if decoder.More() {
|
if decoder.More() {
|
||||||
// there's more data in the stream, so discard whatever is left
|
// there's more data in the stream, so discard whatever is left
|
||||||
io.Copy(ioutil.Discard, r.Body)
|
_, _ = io.Copy(ioutil.Discard, r.Body)
|
||||||
}
|
}
|
||||||
|
|
||||||
return response, err
|
return response, err
|
||||||
|
Reference in New Issue
Block a user