-
Brad Fitzpatrick authored
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/17937Reviewed-by: Russ Cox <rsc@golang.org>
28273ec9