]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-103472: close response in HTTPConnection._tunnel (#103473)
authorThomas Grainger <tagrain@gmail.com>
Tue, 2 May 2023 03:59:42 +0000 (04:59 +0100)
committerGitHub <noreply@github.com>
Tue, 2 May 2023 03:59:42 +0000 (03:59 +0000)
commit9de0cf20fa0485e327e57cc0864c7476da85cfad
treea6f4c32b5d1bebbebecd337b63f4c2c91bea30c2
parent690df4c16ca4f0054d27a6148da9e6af809a2658
GH-103472: close response in HTTPConnection._tunnel (#103473)

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

---------

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]