]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix for a bug in the fix for SF bug 503031. This time the OP verified
authorGuido van Rossum <guido@python.org>
Tue, 2 Apr 2002 14:38:16 +0000 (14:38 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 2 Apr 2002 14:38:16 +0000 (14:38 +0000)
that it works.

Bugfix candidate (this and the previous checkin, obviously).

Lib/urllib.py

index 123642ac9f9fc9388c712df5c90e1412bd17c8d1..d028d7a591b3b4c63a62c3e0019a7bd53bbd81ce 100644 (file)
@@ -1279,8 +1279,8 @@ elif os.name == 'nt':
                     for p in proxyServer.split(';'):
                         protocol, address = p.split('=', 1)
                         # See if address has a type:// prefix
-                        type, address = splittype(address)
-                        if not type:
+                        import re
+                        if not re.match('^([^/:]+)://', address):
                             address = '%s://%s' % (protocol, address)
                         proxies[protocol] = address
                 else: