Brad Fitzpatrick 28273ec927 http2: make Transport's Response.Body.Close not wait for buffered data
The Transport's Response.Body.Close call was closing the
Response.Body, but the Reader implementation was yielding its buffered
data before returning the error. Add a new method to force an
immediate close.  An audit of the other CloseWithError callers found
that the after-buffered-data behavior was correct for them.

New tests in the main go repo in net/http/clientserver_test.go:
TestResponseBodyReadAfterClose_h1 and TestResponseBodyReadAfterClose_h2

Updates golang/go#13648

Change-Id: If3a13a20c106b5a7bbe668ccb4e3c704a0e0682b
Reviewed-on: https://go-review.googlesource.com/17937
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-17 18:00:46 +00:00
2014-12-09 14:17:11 +11:00
2014-12-09 14:17:11 +11:00
2015-12-14 00:45:27 +00:00
2014-12-09 14:17:11 +11:00
2015-08-29 23:03:18 +00:00
2015-12-11 09:22:36 +00:00
2014-12-08 10:44:07 +11:00
2015-03-18 17:04:12 +00:00
2015-02-18 23:42:41 +00:00
2012-03-17 15:20:00 +11:00
2012-01-25 15:31:30 -05:00

This repository holds supplementary Go networking libraries.

To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
[mirror] Go supplementary network libraries
Readme BSD-3-Clause 13 MiB
Languages
Go 99.9%