##// END OF EJS Templates
url: httplib.HTTPSConnection already handles IPv6 and port parsing fine
Benoit Boissinot -
r10408:50fb1fe1 default
parent child Browse files
Show More
@@ -458,7 +458,7 b' if has_https:'
458 self.auth = self.pwmgr.readauthtoken(req.get_full_url())
458 self.auth = self.pwmgr.readauthtoken(req.get_full_url())
459 return self.do_open(self._makeconnection, req)
459 return self.do_open(self._makeconnection, req)
460
460
461 def _makeconnection(self, host, port=443, *args, **kwargs):
461 def _makeconnection(self, host, port=None, *args, **kwargs):
462 keyfile = None
462 keyfile = None
463 certfile = None
463 certfile = None
464
464
@@ -473,13 +473,6 b' if has_https:'
473 keyfile = self.auth['key']
473 keyfile = self.auth['key']
474 certfile = self.auth['cert']
474 certfile = self.auth['cert']
475
475
476 # let host port take precedence
477 if ':' in host and '[' not in host or ']:' in host:
478 host, port = host.rsplit(':', 1)
479 port = int(port)
480 if '[' in host:
481 host = host[1:-1]
482
483 return httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
476 return httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
484
477
485 # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if
478 # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if
General Comments 0
You need to be logged in to leave comments. Login now