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

Florent Guillaume fg@nuxeo.com
Thu, 6 Feb 2003 09:46:40 +0100


In article <200302021421.h12ELsH23390@cvs.baymountain.com> you write:
> === 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
>  

This is an incorrect MIME header, it should be  "text/plain; charset=stuff"
not "text/plain; charset: stuff".

Florent


-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com