Commit bd3b901b authored by Andreas Jung's avatar Andreas Jung

checking for 'REQUEST' in index_html()

parent cf56fc9e
......@@ -87,7 +87,8 @@ class ZReST(Item, PropertyManager, Historical, Implicit, Persistent):
def index_html(self, REQUEST=None):
''' Getting the formatted text
'''
REQUEST.RESPONSE.setHeader('content-type', 'text/html; charset=%s' % self.output_encoding)
if REQUEST:
REQUEST.RESPONSE.setHeader('content-type', 'text/html; charset=%s' % self.output_encoding)
return self.formatted
security.declareProtected('View', 'source_txt')
......
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