[Zope-Checkins] CVS: Zope/lib/python/Products/ZReST - ZReST.py:1.6.12.9

Andreas Jung andreas at andreas-jung.com
Sat Nov 20 11:03:14 EST 2004


Update of /cvs-repository/Zope/lib/python/Products/ZReST
In directory cvs.zope.org:/tmp/cvs-serv29995/lib/python/Products/ZReST

Modified Files:
      Tag: Zope-2_7-branch
	ZReST.py 
Log Message:
checking for 'REQUEST' in index_html()


=== Zope/lib/python/Products/ZReST/ZReST.py 1.6.12.8 => 1.6.12.9 ===
--- Zope/lib/python/Products/ZReST/ZReST.py:1.6.12.8	Thu Nov 18 08:15:52 2004
+++ Zope/lib/python/Products/ZReST/ZReST.py	Sat Nov 20 11:03:13 2004
@@ -87,7 +87,9 @@
     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')



More information about the Zope-Checkins mailing list