/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/controllers/download_ui.py

  • Committer: Matt Nordhoff
  • Date: 2009-10-17 06:55:25 UTC
  • mfrom: (389.2.2 pep8-2009-10)
  • mto: This revision was merged to the branch mainline in revision 406.
  • Revision ID: mnordhoff@mattnordhoff.com-20091017065525-ap2nj2bb0mx3ifq2
Merge my new pep8-2009-10 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import logging
21
21
import mimetypes
22
 
import time
23
22
import urllib
24
23
 
25
24
from paste import httpexceptions
34
33
 
35
34
    def __call__(self, environ, start_response):
36
35
        # /download/<rev_id>/<file_id>/[filename]
37
 
        z = time.time()
38
36
 
39
37
        h = self._history
40
38
 
65
63
            ('Content-Type', mime_type),
66
64
            ('Content-Length', len(content)),
67
65
            ('Content-Disposition',
68
 
             'attachment; filename*=utf-8\'\'%s' % encoded_filename),
 
66
             'attachment; filename*=utf-8\'\'%s' % (encoded_filename,)),
69
67
            ]
70
68
        start_response('200 OK', headers)
71
69
        return [content]