don't convert to HTML if a resource's content has to be downloaded as attachement
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3822 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
57f2aa94f2
commit
3f31f5c79e
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ class ResourceView(BaseView):
|
|||
response.setHeader('Content-Disposition',
|
||||
'attachment; filename=%s' % filename)
|
||||
response.setHeader('Content-Length', len(data))
|
||||
if ct.startswith('text/'):
|
||||
if ct.startswith('text/') and not useAttachment:
|
||||
response.setHeader('Content-Type', 'text/html')
|
||||
return self.renderText(data, ct)
|
||||
response.setHeader('Content-Type', ct)
|
||||
|
|
Loading…
Add table
Reference in a new issue