コード例 #1
0
ファイル: https_server.py プロジェクト: Bluehorn/M2Crypto
 def __init__(self, ip, port, ssl_ctx=None, task_dispatcher=None, adj=None, start=1,
              hit_log=None, verbose=0):
     HTTPServer.__init__(self, ip, port, task_dispatcher, adj, start, hit_log, verbose)
     if ssl_ctx is None:
         self.ssl_ctx = make_ssl_context(os.path.realpath(__file__))
     else: 
         self.ssl_ctx = ssl_ctx
コード例 #2
0
    def __init__(self, application, sub_protocol=None, *args, **kw):

        if sys.platform[:3] == "win" and args[:1] == ('localhost',): # pragma: no cover
            args = ('',) + args[1:]

        self.application = application

        if sub_protocol:
            self.SERVER_IDENT += ' (%s)' % str(sub_protocol)

        HTTPServer.__init__(self, *args, **kw)
コード例 #3
0
    def __init__(self, application, sub_protocol=None, *args, **kw):

        if sys.platform[:3] == "win" and args[:1] == (
                'localhost', ):  # pragma: no cover
            args = ('', ) + args[1:]

        self.application = application

        if sub_protocol:
            self.SERVER_IDENT += ' (%s)' % str(sub_protocol)

        HTTPServer.__init__(self, *args, **kw)
コード例 #4
0
 def __init__(self,
              ip,
              port,
              ssl_ctx=None,
              task_dispatcher=None,
              adj=None,
              start=1,
              hit_log=None,
              verbose=0):
     HTTPServer.__init__(self, ip, port, task_dispatcher, adj, start,
                         hit_log, verbose)
     if ssl_ctx is None:
         self.ssl_ctx = make_ssl_context(os.path.realpath(__file__))
     else:
         self.ssl_ctx = ssl_ctx