[CMF-checkins] CVS: CMF/CMFCore - FSPageTemplate.py:1.14

Florent Guillaume fg@nuxeo.com
Thu, 5 Sep 2002 16:45:57 -0400


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv403

Modified Files:
	FSPageTemplate.py 
Log Message:
Ensured a user-sent content-type is correctly kept.
Added a test to check for that.


=== CMF/CMFCore/FSPageTemplate.py 1.13 => 1.14 ===
--- CMF/CMFCore/FSPageTemplate.py:1.13	Thu Sep  5 14:12:18 2002
+++ CMF/CMFCore/FSPageTemplate.py	Thu Sep  5 16:45:26 2002
@@ -161,12 +161,10 @@
             response = self.REQUEST.RESPONSE
         except AttributeError:
             response = None
+        # Read file first to get a correct content_type default value.
+        self._updateFromFS()
         # call "inherited"
         result = self._ZPT_exec( bound_names, args, kw )
-        if response is not None:
-            # XXX Why do that again? It's already done by ZopePageTemplate.
-            if not response.headers.has_key('content-type'):
-                 response.setHeader('content-type', self.content_type)
         return result
  
     # Copy over more methods