diff options
author | Moshe Zadka <moshez@math.huji.ac.il> | 2001-04-09 14:54:21 +0000 |
---|---|---|
committer | Moshe Zadka <moshez@math.huji.ac.il> | 2001-04-09 14:54:21 +0000 |
commit | 5d87d4729596b0c385e3fa50581ee100396cae2d (patch) | |
tree | 54ff0ae077ad2dcce7c815334001effd961dc070 | |
parent | f870c952f96c72cc23fa75a1ce48418c71fbf76e (diff) | |
download | cpython-git-5d87d4729596b0c385e3fa50581ee100396cae2d.tar.gz |
fixing 408085 - redirect from https becomes http
Even though relative redirects are illegal, they are common
urllib treated every relative redirect as though it was to http,
even if the original was https://
As long as we're compensating for server bugs, might as well do
it properly.
-rw-r--r-- | Lib/urllib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 5572580701..3175199a96 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -556,7 +556,7 @@ class FancyURLopener(URLopener): void = fp.read() fp.close() # In case the server sent a relative URL, join with original: - newurl = basejoin("http:" + url, newurl) + newurl = basejoin(self.type + ":" + url, newurl) if data is None: return self.open(newurl) else: |