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

Andreas Jung andreas@andreas-jung.com
Sun, 2 Feb 2003 09:21:54 -0500


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

Modified Files:
	ZReST.py 
Log Message:
the content-type header is now set with the corresponding encoding parameter


=== Zope/lib/python/Products/ZReST/ZReST.py 1.3 => 1.4 ===
--- Zope/lib/python/Products/ZReST/ZReST.py:1.3	Sat Feb  1 05:23:10 2003
+++ Zope/lib/python/Products/ZReST/ZReST.py	Sun Feb  2 09:21:51 2003
@@ -80,13 +80,14 @@
     def index_html(self, REQUEST=None):
         ''' Getting the formatted text
         '''
-        REQUEST.RESPONSE.setHeader('content-type', 'text/html')
+        REQUEST.RESPONSE.setHeader('content-type', 'text/html; charset: %s' % self.output_encoding)
         return self.formatted
+
     security.declareProtected('View', 'source_txt')
     def source_txt(self, REQUEST=None):
         ''' Getting the source text
         '''
-        REQUEST.RESPONSE.setHeader('content-type', 'text/plain')
+        REQUEST.RESPONSE.setHeader('content-type', 'text/plain; charset: %s' % self.input_encoding)
         return self.source
 
     # edit form, which is also the primary interface
@@ -270,6 +271,9 @@
 
 #
 # $Log$
+# Revision 1.4  2003/02/02 14:21:51  andreasjung
+# the content-type header is now set with the corresponding encoding parameter
+#
 # Revision 1.3  2003/02/01 10:23:10  andreasjung
 # input/output_encoding are now properties making ZReST more configurable
 #