Commit 0161cb87 authored by Jérome Perrin's avatar Jérome Perrin

add "" around filename in content disposition header


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22345 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e6d9cd1a
...@@ -186,7 +186,8 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin): ...@@ -186,7 +186,8 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin):
else: else:
filename = self.getId() filename = self.getId()
if format is None: if format is None:
RESPONSE.setHeader('Content-Disposition','Attachment;Filename=%s' %filename) RESPONSE.setHeader('Content-Disposition',
'attachment; filename="%s"' % filename)
return File.index_html(self, REQUEST, RESPONSE) return File.index_html(self, REQUEST, RESPONSE)
# Make sure file is converted to base format # Make sure file is converted to base format
if not self.hasBaseData(): if not self.hasBaseData():
...@@ -199,7 +200,8 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin): ...@@ -199,7 +200,8 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin):
RESPONSE.setHeader('Content-Length', len(result)) RESPONSE.setHeader('Content-Length', len(result))
RESPONSE.setHeader('Content-Type', mime) RESPONSE.setHeader('Content-Type', mime)
RESPONSE.setHeader('Accept-Ranges', 'bytes') RESPONSE.setHeader('Accept-Ranges', 'bytes')
RESPONSE.setHeader('Content-Disposition','Attachment;Filename=%s' %converted_filename) RESPONSE.setHeader('Content-Disposition',
'attachment; filename="%s"' % converted_filename)
return result return result
# Format conversion implementation # Format conversion implementation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment