Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: do not use buffer when draining and discarding http body
Use io.Copy with io.Discard instead of io.ReadAll to drain the whole http body when an error occurred. This does not write the body unnecessary to a buffer in memory that will never be used.
- Loading branch information