equal
deleted
inserted
replaced
106 urllib2.ProxyHandler.__init__(self, proxies) |
106 urllib2.ProxyHandler.__init__(self, proxies) |
107 self.ui = ui |
107 self.ui = ui |
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) |
116 baseclass = req.__class__ |
121 baseclass = req.__class__ |
117 class _request(baseclass): |
122 class _request(baseclass): |