mirror of https://github.com/golang/go.git
net/http: close res.Body
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
69583738eb
commit
d957ce1020
|
|
@ -826,6 +826,7 @@ func TestResponseContentLengthShortBody(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer res.Body.Close()
|
||||
if res.ContentLength != 123 {
|
||||
t.Fatalf("Content-Length = %d; want 123", res.ContentLength)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue