]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-69152: add method get_proxy_response_headers to HTTPConnection class (#104248)
authorAlexey Namyotkin <62434915+nametkin@users.noreply.github.com>
Tue, 16 May 2023 06:20:30 +0000 (09:20 +0300)
committerGitHub <noreply@github.com>
Tue, 16 May 2023 06:20:30 +0000 (06:20 +0000)
commit85ec192ac4b000d4e47df6123b65eacbd1fdccfa
tree6029b8cda6865e42154c9bcea0e419c8ba0f54eb
parent24d8b88420b81fc60aeb0cbcacef1e72d633824a
gh-69152: add method get_proxy_response_headers to HTTPConnection class (#104248)

Add http.client.HTTPConnection method get_proxy_response_headers() - this is a followup to https://github.com/python/cpython/pull/26152 which added it as a non-public attribute. This way we don't pre-compute a headers dictionary that most users will never access. The new method is properly public and documented and triggers full proxy header parsing into a dict only when actually called.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Doc/library/http.client.rst
Lib/http/client.py
Lib/test/test_httplib.py
Misc/NEWS.d/next/Library/2021-05-16-14-28-30.bpo-24964.Oa5Ie_.rst