示例#1
0
 def get(self, request_id):
     resp = db_api.get_response_body(request_id)
     if not resp:
         raise HTTPError(404)
     mimetype = resp['mimetype']
     encoding = resp['content_encoding']
     out = xhtml_escape(hexdump.hexdump(resp['body'], 'return'))
     self.write(dict(mimetype=mimetype, encoding=encoding, body=out))
示例#2
0
 def get(self, request_id):
     resp = db_api.get_response_body(request_id)
     if not resp:
         raise HTTPError(404)
     mimetype = resp['mimetype']
     encoding = resp['content_encoding']
     out = format_http_body(encoding, mimetype, resp['body'])
     self.write(out)
示例#3
0
    def get(self, request_id):
        resp = db_api.get_response_body(request_id)
        if not resp:
            raise HTTPError(404)
        mimetype = resp['mimetype']
        body = xhtml_escape(str(resp['body']).decode('UTF-8', 'ignore'))

        self.write(dict(mimetype=mimetype, body=body))
示例#4
0
 def get(self, request_id):
     resp = db_api.get_response_body(request_id)
     if not resp:
         raise HTTPError(404)
     self.set_header('Content-Type', resp['mimetype'])
     self.write(str(resp['body']))