Skip to content
Snippets Groups Projects
Commit 430963d0 authored by Gunnar Schaefer's avatar Gunnar Schaefer
Browse files

BF: response headers must be strings

parent 0e6be579
No related branches found
No related tags found
No related merge requests found
......@@ -240,7 +240,7 @@ class Container(base.RequestHandler):
self.response.app_iter = open(filepath, 'rb')
self.response.headers['Content-Length'] = str(fileinfo['filesize']) # must be set after setting app_iter
if self.request.get('view').lower() in ['1', 'true']:
self.response.headers['Content-Type'] = fileinfo.get('mimetype', 'application/octet-stream')
self.response.headers['Content-Type'] = str(fileinfo.get('mimetype', 'application/octet-stream'))
else:
self.response.headers['Content-Type'] = 'application/octet-stream'
self.response.headers['Content-Disposition'] = 'attachment; filename="' + filename + '"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment