Close the body after reading the response body information (#5907)

Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
This commit is contained in:
Fish-pro
2023-02-16 01:41:51 +08:00
committed by GitHub
parent 8a0d3ba3ca
commit 156da74ad3
2 changed files with 3 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ func TestCustomHTTPRequestValidator(t *testing.T) {
if res.StatusCode != tc.expected {
t.Error("unexpected HTTP code", res.StatusCode)
}
res.Body.Close()
})
}
}