summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-05 13:58:13 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-05 13:58:13 (GMT)
commite0c0da98d85a343ec0578ce8ce690fb952118a0b (patch)
tree5148d0db6f3bcada6112a7528a06c7739c2d5a39 /Lib/urllib.py
parenta986bb7e5c9597b4e9407502795e20f4a8855699 (diff)
downloadcpython-e0c0da98d85a343ec0578ce8ce690fb952118a0b.zip
cpython-e0c0da98d85a343ec0578ce8ce690fb952118a0b.tar.gz
cpython-e0c0da98d85a343ec0578ce8ce690fb952118a0b.tar.bz2
Patches to make the proxy code work again. (Why does that always break
as soon as I change things even just a little bit? :-) Even works when accessing a password-protected page through the proxy. Prompted by complaints from, and correct operation verified by, Nigel O'Brian.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 1f110c0..cabfeee 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -223,6 +223,7 @@ class URLopener:
else:
host, selector = url
urltype, rest = splittype(selector)
+ url = rest
user_passwd = None
if string.lower(urltype) != 'http':
realhost = None
@@ -459,8 +460,8 @@ class FancyURLopener(URLopener):
user, passwd = self.get_user_passwd(host, realm, i)
if not (user or passwd): return None
host = user + ':' + passwd + '@' + host
- newurl = '//' + host + selector
- return self.open_http(newurl)
+ newurl = 'http://' + host + selector
+ return self.open(newurl)
def get_user_passwd(self, host, realm, clear_cache = 0):
key = realm + '@' + string.lower(host)