Re: [go-nuts] Draining http response bodies

2021-10-08 Thread Amnon
Whatever the OS, the crucial question is whether the TCP connections get reused, or whether a new TCP (and potentially TLS) connection has to be negotiated, involving multiple round trips to the server. Someone has kindly pointed out that the docs do spell out the behaviour - I just missed the

Re: [go-nuts] Draining http response bodies

2021-10-08 Thread David Riley
On Oct 7, 2021, at 3:36 AM, Amnon wrote: > > Is it necessary for a http client to fully read the http response body? > > Opinion on the Go forums seems divided > https://forum.golangbridge.org/t/do-i-need-to-read-the-body-before-close-it/5594 > > But a simple benchmark https://play.golang.org/

[go-nuts] Draining http response bodies

2021-10-07 Thread Amnon
Is it necessary for a http client to fully read the http response body? Opinion on the Go forums seems divided https://forum.golangbridge.org/t/do-i-need-to-read-the-body-before-close-it/5594 But a simple benchmark https://play.golang.org/p/5JDWYbRe0lD suggests that leaving unread data in the re