--- /usr/lib/python2.3/urllib2.py 2004-02-24 02:34:02.000000000 -0600 +++ urllib2.py 2004-03-24 15:43:50.000000000 -0600 @@ -494,8 +494,11 @@ def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) + # Handle the case where http_proxy is specified as "host:port" + if type and type not in ('http', 'https', 'ftp'): + type, r_type = 'http', proxy host, XXX = splithost(r_type) - if '@' in host: + if host and '@' in host: user_pass, host = host.split('@', 1) if ':' in user_pass: user, password = user_pass.split(':', 1)