##// END OF EJS Templates
proxy: allow wildcards in the no proxy list (issue1821)
Matt Mackall -
r19535:df2155eb default
parent child Browse files
Show More
@@ -108,8 +108,13 b' class proxyhandler(urllib2.ProxyHandler)'
108
108
109 def proxy_open(self, req, proxy, type_):
109 def proxy_open(self, req, proxy, type_):
110 host = req.get_host().split(':')[0]
110 host = req.get_host().split(':')[0]
111 if host in self.no_list:
111 for e in self.no_list:
112 return None
112 if host == e:
113 return None
114 if e.startswith('*.') and host.endswith(e[2:]):
115 return None
116 if e.startswith('.') and host.endswith(e[1:]):
117 return None
113
118
114 # work around a bug in Python < 2.4.2
119 # work around a bug in Python < 2.4.2
115 # (it leaves a "\n" at the end of Proxy-authorization headers)
120 # (it leaves a "\n" at the end of Proxy-authorization headers)
General Comments 0
You need to be logged in to leave comments. Login now