~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/serve/__init__.py

  • Committer: William Grant
  • Date: 2010-07-28 05:06:15 UTC
  • Revision ID: grantw@unimelb.edu.au-20100728050615-uwbxn9frla3pdw8m
Encode content_type when downloading files. cjson made us write bad code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
            req.headers_out["Content-Disposition"] = (
139
139
                         "attachment; filename=%s" %
140
140
                             response['name'].encode('utf-8'))
141
 
        req.content_type = response['type']
 
141
        req.content_type = response['type'].encode('utf-8')
142
142
        req.write(out)
143
143
 
144
144
class DownloadView(ServeView):