Commit 04ee751a authored by Bartek Górny's avatar Bartek Górny

Send content_type if available (patch by Luke, Poland)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11781 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 885ccc87
......@@ -69,7 +69,10 @@
<item>
<key> <string>_body</string> </key>
<value> <string>request=context.REQUEST\n
request.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
if hasattr(context,\'getContentType\'):\n
request.RESPONSE.setHeader(\'Content-type\', context.getContentType())\n
else:\n
request.RESPONSE.setHeader(\'Content-type\', context.getFormat())\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % context.title_or_id())\n
return context.manage_FTPget()\n
</string> </value>
......@@ -117,6 +120,7 @@ return context.manage_FTPget()\n
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>hasattr</string>
</tuple>
</value>
</item>
......
224
\ No newline at end of file
225
\ No newline at end of file
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