Skip to content

Conversation

@eitankatznelson
Copy link

@eitankatznelson eitankatznelson commented Nov 1, 2021

Make sure that even when response status is <300 that we fully read the response body.

The http.Do function documentation states that:

// If the returned error is nil, the Response will contain a non-nil
// Body which the user is expected to close. If the Body is not both
// read to EOF and closed, the Client's underlying RoundTripper
// (typically Transport) may not be able to re-use a persistent TCP
// connection to the server for a subsequent "keep-alive" request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant