]> Cypherpunks repositories - gostls13.git/commit
net/http: close response body in TestRequestBodyLimit
authorDamien Neil <dneil@google.com>
Wed, 7 Jun 2023 21:13:55 +0000 (14:13 -0700)
committerDamien Neil <dneil@google.com>
Wed, 7 Jun 2023 23:23:37 +0000 (23:23 +0000)
commit8bfe839c5f514ae7a466889d74262c9e7d89742f
tree1f205b5e40a77906fdc92ddb61680a983e54bbb8
parent72b08dbaf316dcc9df210ad71d827922d11984d0
net/http: close response body in TestRequestBodyLimit

Failing to close the response body before returning leaks
the in-progress request past the test lifetime.

Fixes #60264

Change-Id: Ic327d9f8e02e87ed656324aaa042f833d9ea18ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/501309
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/net/http/serve_test.go