http2: make it possible to connect w/o ssl on port 443
authorAugie Fackler <raf@durin42.com>
Tue, 16 Oct 2012 18:05:33 -0500
changeset 17787 21503aa02d4f
parent 17786 72c234081ae1
child 17788 9912baaae7df
http2: make it possible to connect w/o ssl on port 443 The fix is just to make sure we always pass use_ssl=False to non-SSL connections.
mercurial/httpconnection.py
--- a/mercurial/httpconnection.py	Mon Oct 15 17:43:05 2012 +0200
+++ b/mercurial/httpconnection.py	Tue Oct 16 18:05:33 2012 -0500
@@ -233,7 +233,9 @@
     def http_open(self, req):
         if req.get_full_url().startswith('https'):
             return self.https_open(req)
-        return self.do_open(HTTPConnection, req, False)
+        def makehttpcon(*args, **kwargs):
+            return HTTPConnection(*args, use_ssl=False, **kwargs)
+        return self.do_open(makehttpcon, req, False)
 
     def https_open(self, req):
         # req.get_full_url() does not contain credentials and we may