xmlrpctransport.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:sslxray 作者: portcullislabs 项目源码 文件源码
def make_connection(self, host):
        # return an existing connection if possible.  This allows
        # HTTP/1.1 keep-alive.
        if self._connection and host == self._connection[0]:
            http = self._connection[1]
        else:
            # create a HTTPS connection object from a host descriptor
            chost, extra_headers, x509 = self.get_host_info(host)

            http = HTTPTLSConnection(chost, None,
                                     username=self.username, password=self.password,
                                     certChain=self.certChain, privateKey=self.privateKey,
                                     checker=self.checker,
                                     settings=self.settings,
                                     ignoreAbruptClose=self.ignoreAbruptClose)
            # store the host argument along with the connection object
            self._connection = host, http
        if not self.conn_class_is_http:
            return http
        http2 = httplib.HTTP()
        http2._setup(http)
        return http2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号