]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] GH-103472: close response in HTTPConnection._tunnel (GH-103473) (#104077)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 2 May 2023 06:48:07 +0000 (23:48 -0700)
committerGitHub <noreply@github.com>
Tue, 2 May 2023 06:48:07 +0000 (23:48 -0700)
commit0d4026432591d43185568dd31cef6a034c4b9261
treedad2f5635285229b3bf9a3fdc4125e37741fb107
parentb07bae6971c3772c3d376813cdbbe4e719d4d322
[3.11] GH-103472: close response in HTTPConnection._tunnel (GH-103473) (#104077)

GH-103472: close response in HTTPConnection._tunnel (GH-103473)

Avoid a potential `ResourceWarning` in `http.client.HTTPConnection`
by closing the proxy / tunnel's CONNECT response explicitly.

---------

(cherry picked from commit 9de0cf20fa0485e327e57cc0864c7476da85cfad)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/http/client.py
Lib/test/test_httplib.py
Misc/NEWS.d/next/Library/2023-04-12-13-04-16.gh-issue-103472.C6bOHv.rst [new file with mode: 0644]