|
a/Allura/allura/model/filesystem.py |
|
b/Allura/allura/model/filesystem.py |
|
... |
|
... |
88 |
|
88 |
|
89 |
def serve(self, embed=True):
|
89 |
def serve(self, embed=True):
|
90 |
'''Sets the response headers and serves as a wsgi iter'''
|
90 |
'''Sets the response headers and serves as a wsgi iter'''
|
91 |
fp = self.rfile()
|
91 |
fp = self.rfile()
|
92 |
pylons.response.headers['Content-Type'] = ''
|
92 |
pylons.response.headers['Content-Type'] = ''
|
93 |
pylons.response.content_type = fp.content_type.encode('utf-8')
|
93 |
pylons.response.content_type = self.content_type.encode('utf-8')
|
94 |
if not embed:
|
94 |
if not embed:
|
95 |
pylons.response.headers.add(
|
95 |
pylons.response.headers.add(
|
96 |
'Content-Disposition',
|
96 |
'Content-Disposition',
|
97 |
'attachment;filename="%s"' % self.filename.encode('utf-8'))
|
97 |
'attachment;filename="%s"' % self.filename.encode('utf-8'))
|
98 |
return iter(fp)
|
98 |
return iter(fp)
|