Пример #1
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
Пример #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