From: Guido van Rossum Date: Tue, 2 Apr 2002 14:38:16 +0000 (+0000) Subject: Fix for a bug in the fix for SF bug 503031. This time the OP verified X-Git-Tag: v2.3c1~6167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64e5aa93919bb0ffd95a11a5da7bac64faaf9faf;p=thirdparty%2FPython%2Fcpython.git Fix for a bug in the fix for SF bug 503031. This time the OP verified that it works. Bugfix candidate (this and the previous checkin, obviously). --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 123642ac9f9f..d028d7a591b3 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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: