def get(self, request_id): resp = db_api.get_request_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)
def get(self, request_id): resp = db_api.get_request_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))
def get(self, request_id): resp = db_api.get_request_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))