mercurial/url.py
changeset 29599 e3dc96834126
parent 29589 486de14eb394
child 29639 6fd751fa58d3
equal deleted inserted replaced
29598:a67398726747 29599:e3dc96834126
   182             raise socket.error(msg)
   182             raise socket.error(msg)
   183 
   183 
   184 class httpconnection(keepalive.HTTPConnection):
   184 class httpconnection(keepalive.HTTPConnection):
   185     # must be able to send big bundle as stream.
   185     # must be able to send big bundle as stream.
   186     send = _gen_sendfile(keepalive.HTTPConnection.send)
   186     send = _gen_sendfile(keepalive.HTTPConnection.send)
   187 
       
   188     def connect(self):
       
   189         if has_https and self.realhostport: # use CONNECT proxy
       
   190             self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
       
   191             self.sock.connect((self.host, self.port))
       
   192             if _generic_proxytunnel(self):
       
   193                 # we do not support client X.509 certificates
       
   194                 self.sock = sslutil.wrapsocket(self.sock, None, None, None,
       
   195                                                serverhostname=self.host)
       
   196         else:
       
   197             keepalive.HTTPConnection.connect(self)
       
   198 
   187 
   199     def getresponse(self):
   188     def getresponse(self):
   200         proxyres = getattr(self, 'proxyres', None)
   189         proxyres = getattr(self, 'proxyres', None)
   201         if proxyres:
   190         if proxyres:
   202             if proxyres.will_close:
   191             if proxyres.will_close: