diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2009-10-11 06:07:46 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2009-10-11 06:07:46 (GMT) |
commit | 1130163dc1a1e278e56ce4316da109e234269f3e (patch) | |
tree | 698acddbd8ff147526022d4f5c9dc20ab20783fe /Lib/urllib | |
parent | 290e939f2e22d459d7e22f39e6a5660a8a2f4e96 (diff) | |
download | cpython-1130163dc1a1e278e56ce4316da109e234269f3e.zip cpython-1130163dc1a1e278e56ce4316da109e234269f3e.tar.gz cpython-1130163dc1a1e278e56ce4316da109e234269f3e.tar.bz2 |
Merged revisions 75334 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r75334 | senthil.kumaran | 2009-10-11 10:28:55 +0530 (Sun, 11 Oct 2009) | 9 lines
Merged revisions 75333 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75333 | senthil.kumaran | 2009-10-11 07:30:07 +0530 (Sun, 11 Oct 2009) | 3 lines
Fixed Issue6894, urllib2 doesn't respect "no_proxy" environment
........
................
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index f787407..9f7ebd7 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -657,6 +657,10 @@ class ProxyHandler(BaseHandler): proxy_type, user, password, hostport = _parse_proxy(proxy) if proxy_type is None: proxy_type = orig_type + + if req.host and proxy_bypass(req.host): + return None + if user and password: user_pass = '%s:%s' % (unquote(user), unquote(password)) |