Permalink
Browse files

encode those unicode headers so modwsgi\n\ndoesn't Type error

  • Loading branch information...
1 parent 09bd51e commit f8a5679f26d256887d6ac0f59fec0142df5fd387 @reedobrien reedobrien committed Oct 1, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 lumin/grid_fs.py
View
@@ -103,13 +103,14 @@ def response(self):
return Response(
body=self.gf.read(),
content_disposition='attachment; filename={}'.format(
- self.gf.filename),
- content_type=self.gf.content_type if self.gf.content_type \
- else 'binary/octet-stream',
+ self.gf.filename.encode('utf8')),
+ content_type=self.gf.content_type.encode('utf8') if \
+ self.gf.content_type else 'binary/octet-stream',
content_length=self.gf.length
)
+
#@view_config(route_name='files')
# def grid_files(request):
# return request.context.response()

0 comments on commit f8a5679

Please sign in to comment.