~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-02-23 08:48:09 UTC
  • mfrom: (1673 trunk)
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: grantw@unimelb.edu.au-20100223084809-du6dvsxrjhw15ytr
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
class ServeView(BaseView):
40
40
    subpath_allowed = True
 
41
    offsite_posts_allowed = True
41
42
 
42
43
    def authorize(self, req):
43
44
        return req.user is not None
131
132
                                     response['error'])
132
133
 
133
134
        if download:
134
 
            req.headers_out["Content-Disposition"] = \
135
 
                         "attachment; filename=%s" % response['name']
 
135
            req.headers_out["Content-Disposition"] = (
 
136
                         "attachment; filename=%s" %
 
137
                             response['name'].encode('utf-8'))
136
138
        req.content_type = response['type']
137
139
        req.write(out)
138
140