You can stop on the middle of the request - but then you cannot reuse the http connection.
If you want more advanced reuse you need to transfer in chunks and have a higher level protocol Also, I think this is addressed in HTTP2 since all connections are multiplexed anyway. > On May 21, 2020, at 1:37 PM, diop...@gmail.com wrote: > > > You ever get an answer to this? > >> On Friday, March 15, 2013 at 9:24:30 PM UTC-7, Tong Sun wrote: >> Not to question the decision, but that seem really counter-intuitive, as I >> think people stop web requests in the middle all the times. >> >> Why go insists on reading the _entire_ response body before >> resp.Body.Close(), even some 700mb has to be read and discarded? Again, just >> curious to know. Also, any other method that allow people stop in the >> middle of web requests? >> >> Thanks >> >>> On Friday, March 15, 2013 9:10:32 PM UTC-4, Dave Cheney wrote: >>> That is correct. You _must_ close the response body, and closing the >>> response body _must_ read all the data on the connection so it can >>> return the connection to the connection pool. >>> >>> On Sat, Mar 16, 2013 at 12:06 PM, Wendal Chen <wenda...@gmail.com> wrote: >>> > So, I can't close it before read ALL data? >>> > >>> > >>> > 2013/3/16 Dave Cheney <da...@cheney.net> >>> >> >>> >> Calling resp.Body.Close() must read the _entire_ response body (some >>> >> 700mb). > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/bd6e7c51-f209-46ef-9d17-5e58a5d383d2%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/88A8757C-5234-4C12-B1FB-97042A79F1FD%40ix.netcom.com.