mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly
This commit is contained in:
parent
cddcafaf6b
commit
f8a6b005fd
3 changed files with 30 additions and 9 deletions
|
@ -173,6 +173,9 @@ class HTTPError(URLError, addinfourl):
|
|||
def reason(self):
|
||||
return self.msg
|
||||
|
||||
def info(self):
|
||||
return self.hdrs
|
||||
|
||||
# copied from cookielib.py
|
||||
_cut_port_re = re.compile(r":\d+$")
|
||||
def request_host(request):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue