summaryrefslogtreecommitdiff
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2009-10-11 04:58:55 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2009-10-11 04:58:55 +0000
commit7bb0497336a18520bd87da2bd2fba809ae56ee1a (patch)
tree046f3d765b4dd45ac3d95ef9eb854e60ae8c2472 /Lib/urllib/request.py
parent7291cf83048e45e4bb2aca776292bad0abe0d4e8 (diff)
downloadcpython-git-7bb0497336a18520bd87da2bd2fba809ae56ee1a.tar.gz
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/request.py')
-rw-r--r--Lib/urllib/request.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 6bc386ba84..67f62eb39f 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))