|
a/Allura/allura/model/filesystem.py |
|
b/Allura/allura/model/filesystem.py |
|
... |
|
... |
95 |
fp = self.rfile()
|
95 |
fp = self.rfile()
|
96 |
pylons.response.headers['Content-Type'] = ''
|
96 |
pylons.response.headers['Content-Type'] = ''
|
97 |
pylons.response.content_type = self.content_type.encode('utf-8')
|
97 |
pylons.response.content_type = self.content_type.encode('utf-8')
|
98 |
pylons.response.cache_expires = asint(config.get('files_expires_header_secs', 60 * 60))
|
98 |
pylons.response.cache_expires = asint(config.get('files_expires_header_secs', 60 * 60))
|
99 |
pylons.response.last_modified = self._id.generation_time
|
99 |
pylons.response.last_modified = self._id.generation_time
|
|
|
100 |
if 'Pragma' in pylons.response.headers:
|
100 |
del pylons.response.headers['Pragma']
|
101 |
del pylons.response.headers['Pragma']
|
|
|
102 |
if 'Cache-Control' in pylons.response.headers:
|
101 |
del pylons.response.headers['Cache-Control']
|
103 |
del pylons.response.headers['Cache-Control']
|
102 |
if not embed:
|
104 |
if not embed:
|
103 |
pylons.response.headers.add(
|
105 |
pylons.response.headers.add(
|
104 |
'Content-Disposition',
|
106 |
'Content-Disposition',
|
105 |
'attachment;filename="%s"' % self.filename.encode('utf-8'))
|
107 |
'attachment;filename="%s"' % self.filename.encode('utf-8'))
|
106 |
return iter(fp)
|
108 |
return iter(fp)
|