Commit d15879cb authored by Jérome Perrin's avatar Jérome Perrin

headers will be set by index_html

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35740 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 12b9a7aa
......@@ -58,21 +58,11 @@ response = request.RESPONSE\n
\n
from zExceptions import Unauthorized\n
\n
if hasattr(context,\'getContentType\'):\n
response.setHeader(\'Content-type\', context.getContentType())\n
else:\n
response.setHeader(\'Content-type\', context.getFormat())\n
\n
file_name = context.getSourceReference() or context.getTitle() or context.getId()\n
response.setHeader(\'Content-disposition\', \'attachment; filename="%s"\' % file_name)\n
\n
try:\n
result = context.index_html(request, response)\n
return context.index_html(request, response)\n
except Unauthorized:\n
msg = context.Base_translateString("You do not have enough permission for converting this document.")\n
return context.Base_redirect(keep_items=dict(portal_status_message=msg))\n
\n
return result\n
</string> </value>
</item>
<item>
......@@ -115,10 +105,7 @@ return result\n
<string>response</string>
<string>zExceptions</string>
<string>Unauthorized</string>
<string>hasattr</string>
<string>context</string>
<string>file_name</string>
<string>result</string>
<string>msg</string>
<string>dict</string>
</tuple>
......
1592
\ No newline at end of file
1593
\ 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