下面的示例代码:
document = response["message_data"]["file_link"]
cherrypy.response.headers['Content-Type'] = "'Content-Type', 'application/zip'"
cherrypy.response.headers['Content-Disposition'] = ('attachment; filename=' + name.format(fname=name))
response = urllib2.urlopen(document)
export_file = response.read()
return export_file
raise cherrypy.HTTPRedirect(redirect_to)
如何引发HTTPRedirect同时返回文件obj。