Commit b931bf3c authored by Guido van Rossum's avatar Guido van Rossum

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".
parent 1f1e7270
...@@ -373,7 +373,7 @@ class URLopener: ...@@ -373,7 +373,7 @@ class URLopener:
errcode, errmsg, headers = h.getreply() errcode, errmsg, headers = h.getreply()
fp = h.getfile() fp = h.getfile()
if errcode == 200: if errcode == 200:
return addinfourl(fp, headers, url) return addinfourl(fp, headers, "https:" + url)
else: else:
if data is None: if data is None:
return self.http_error(url, fp, errcode, errmsg, headers) return self.http_error(url, fp, errcode, errmsg, headers)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment