コード例 #1
0
    def __init__(self,
                 method,
                 path,
                 query,
                 inheaders,
                 request_body_file,
                 outheaders,
                 response_protocol,
                 static_cache,
                 opts,
                 remote_addr,
                 remote_port,
                 is_trusted_ip,
                 translator_cache,
                 tdir,
                 forwarded_for,
                 request_original_uri=None):

        (self.method, self.path, self.query, self.inheaders,
         self.request_body_file, self.outheaders, self.response_protocol,
         self.static_cache,
         self.translator_cache) = (method, path, query, inheaders,
                                   request_body_file, outheaders,
                                   response_protocol, static_cache,
                                   translator_cache)

        self.remote_addr, self.remote_port, self.is_trusted_ip = remote_addr, remote_port, is_trusted_ip
        self.forwarded_for = forwarded_for
        self.request_original_uri = request_original_uri
        self.opts = opts
        self.status_code = http_client.OK
        self.outcookie = Cookie()
        self.lang_code = self.gettext_func = self.ngettext_func = None
        self.set_translator(self.get_preferred_language())
        self.tdir = tdir
コード例 #2
0
    def __init__(self, method, path, query, inheaders, request_body_file, outheaders, response_protocol,
                 static_cache, opts, remote_addr, remote_port, is_local_connection, translator_cache, tdir):

        (self.method, self.path, self.query, self.inheaders, self.request_body_file, self.outheaders,
         self.response_protocol, self.static_cache, self.translator_cache) = (
            method, path, query, inheaders, request_body_file, outheaders,
            response_protocol, static_cache, translator_cache
        )
        self.remote_addr, self.remote_port, self.is_local_connection = remote_addr, remote_port, is_local_connection
        self.opts = opts
        self.status_code = http.client.OK
        self.outcookie = Cookie()
        self.lang_code = self.gettext_func = self.ngettext_func = None
        self.set_translator(self.get_preferred_language())
        self.tdir = tdir
コード例 #3
0
ファイル: http_response.py プロジェクト: suman95/calibre
    def __init__(self, method, path, query, inheaders, request_body_file, outheaders, response_protocol,
                 static_cache, opts, remote_addr, remote_port, translator_cache, tdir):

        (self.method, self.path, self.query, self.inheaders, self.request_body_file, self.outheaders,
         self.response_protocol, self.static_cache, self.translator_cache) = (
            method, path, query, inheaders, request_body_file, outheaders,
            response_protocol, static_cache, translator_cache
        )
        self.remote_addr, self.remote_port = remote_addr, remote_port
        self.opts = opts
        self.status_code = httplib.CREATED if self.method == 'POST' else httplib.OK
        self.outcookie = Cookie()
        self.lang_code = self.gettext_func = self.ngettext_func = None
        self.set_translator(self.get_preferred_language())
        self.tdir = tdir
        self.allowed_book_ids = {}