diff options
author | Alexey Namyotkin <62434915+nametkin@users.noreply.github.com> | 2023-05-16 09:20:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 06:20:30 +0000 |
commit | 85ec192ac4b000d4e47df6123b65eacbd1fdccfa (patch) | |
tree | 6029b8cda6865e42154c9bcea0e419c8ba0f54eb /Misc/NEWS.d | |
parent | 24d8b88420b81fc60aeb0cbcacef1e72d633824a (diff) | |
download | cpython-git-85ec192ac4b000d4e47df6123b65eacbd1fdccfa.tar.gz |
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>
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-05-16-14-28-30.bpo-24964.Oa5Ie_.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-05-16-14-28-30.bpo-24964.Oa5Ie_.rst b/Misc/NEWS.d/next/Library/2021-05-16-14-28-30.bpo-24964.Oa5Ie_.rst index ba113673b7..0904b162e6 100644 --- a/Misc/NEWS.d/next/Library/2021-05-16-14-28-30.bpo-24964.Oa5Ie_.rst +++ b/Misc/NEWS.d/next/Library/2021-05-16-14-28-30.bpo-24964.Oa5Ie_.rst @@ -1,3 +1,3 @@ -Added attribute '_proxy_response_headers' to HTTPConnection class. This -attribute contains the headers of the proxy server response to the CONNECT -request. +Added :meth:`http.client.HTTPConnection.get_proxy_response_headers` that +provides access to the HTTP headers on a proxy server response to the +``CONNECT`` request. |