Show More
@@ -107,6 +107,9 b' class basehttphandler(keepalive.HTTPHand' | |||||
107 | def http_open(self, req): |
|
107 | def http_open(self, req): | |
108 | return self.do_open(httpconnection, req) |
|
108 | return self.do_open(httpconnection, req) | |
109 |
|
109 | |||
|
110 | def __del__(self): | |||
|
111 | self.close_all() | |||
|
112 | ||||
110 | has_https = hasattr(urllib2, 'HTTPSHandler') |
|
113 | has_https = hasattr(urllib2, 'HTTPSHandler') | |
111 | if has_https: |
|
114 | if has_https: | |
112 | class httpsconnection(httplib.HTTPSConnection): |
|
115 | class httpsconnection(httplib.HTTPSConnection): | |
@@ -203,8 +206,7 b' class httprepository(remoterepository):' | |||||
203 |
|
206 | |||
204 | proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy') |
|
207 | proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy') | |
205 | # XXX proxyauthinfo = None |
|
208 | # XXX proxyauthinfo = None | |
206 |
|
|
209 | handlers = [httphandler()] | |
207 | handlers = [self.handler] |
|
|||
208 |
|
210 | |||
209 | if proxyurl: |
|
211 | if proxyurl: | |
210 | # proxy can be proper url or host[:port] |
|
212 | # proxy can be proper url or host[:port] | |
@@ -270,11 +272,6 b' class httprepository(remoterepository):' | |||||
270 | opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] |
|
272 | opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] | |
271 | urllib2.install_opener(opener) |
|
273 | urllib2.install_opener(opener) | |
272 |
|
274 | |||
273 | def __del__(self): |
|
|||
274 | if self.handler: |
|
|||
275 | self.handler.close_all() |
|
|||
276 | self.handler = None |
|
|||
277 |
|
||||
278 | def url(self): |
|
275 | def url(self): | |
279 | return self.path |
|
276 | return self.path | |
280 |
|
277 |
General Comments 0
You need to be logged in to leave comments.
Login now