[3.12] gh-105626: Change the default return value of HTTPConnection.get_proxy_response_headers (GH-105628) (#106738)

gh-105626: Change the default return value of `HTTPConnection.get_proxy_response_headers` (GH-105628)
(cherry picked from commit 490295d651)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-07-14 00:21:02 -07:00 committed by GitHub
parent 6a1a660158
commit e68b280671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

View file

@ -970,13 +970,12 @@ class HTTPConnection:
received from the proxy server to the CONNECT request
sent to set the tunnel.
If the CONNECT request was not sent, the method returns
an empty dictionary.
If the CONNECT request was not sent, the method returns None.
"""
return (
_parse_header_lines(self._raw_proxy_headers)
if self._raw_proxy_headers is not None
else {}
else None
)
def connect(self):