url: httplib.HTTPSConnection already handles IPv6 and port parsing fine
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 10 Feb 2010 20:08:18 +0100
changeset 10408 50fb1fe143ff
parent 10407 2e8926e9cc32
child 10409 4c94a3df4b10
url: httplib.HTTPSConnection already handles IPv6 and port parsing fine
mercurial/url.py
--- a/mercurial/url.py	Wed Feb 10 10:58:11 2010 -0800
+++ b/mercurial/url.py	Wed Feb 10 20:08:18 2010 +0100
@@ -458,7 +458,7 @@
             self.auth = self.pwmgr.readauthtoken(req.get_full_url())
             return self.do_open(self._makeconnection, req)
 
-        def _makeconnection(self, host, port=443, *args, **kwargs):
+        def _makeconnection(self, host, port=None, *args, **kwargs):
             keyfile = None
             certfile = None
 
@@ -473,13 +473,6 @@
                 keyfile = self.auth['key']
                 certfile = self.auth['cert']
 
-            # let host port take precedence
-            if ':' in host and '[' not in host or ']:' in host:
-                host, port = host.rsplit(':', 1)
-                port = int(port)
-                if '[' in host:
-                    host = host[1:-1]
-
             return httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
 
 # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if