changeset 10408:50fb1fe143ff

url: httplib.HTTPSConnection already handles IPv6 and port parsing fine
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 10 Feb 2010 20:08:18 +0100
parents 2e8926e9cc32
children 4c94a3df4b10
files mercurial/url.py
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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