mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
SF patch #490515 (Joe A) urllib.open_https() protocol issue
open_http():
In urllib.py library module, URLopener.open_https()
returns a class instance of addinfourl() with its
self.url property missing the protocol.
Instead of "https://www.someurl.com", it becomes
"://www.someurl.com".
This commit is contained in:
parent
1f1e7270cf
commit
b931bf3c55
1 changed files with 1 additions and 1 deletions
|
|
@ -373,7 +373,7 @@ def open_https(self, url, data=None):
|
|||
errcode, errmsg, headers = h.getreply()
|
||||
fp = h.getfile()
|
||||
if errcode == 200:
|
||||
return addinfourl(fp, headers, url)
|
||||
return addinfourl(fp, headers, "https:" + url)
|
||||
else:
|
||||
if data is None:
|
||||
return self.http_error(url, fp, errcode, errmsg, headers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue