mirror of
https://github.com/golang/go
synced 2024-09-06 00:19:45 +00:00
net/http/cgi: close res.Body
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
cda1e40b44
commit
0823701905
|
@ -385,12 +385,11 @@ func TestCopyError(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("Write: %v", err)
|
||||
}
|
||||
|
||||
res, err := http.ReadResponse(bufio.NewReader(conn), req)
|
||||
if err != nil {
|
||||
t.Fatalf("ReadResponse: %v", err)
|
||||
}
|
||||
|
||||
defer res.Body.Close()
|
||||
var buf [5000]byte
|
||||
n, err := io.ReadFull(res.Body, buf[:])
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue