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

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


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

Modified Files:
      Tag: CMF-1_3-branch
	FSPageTemplate.py 
Log Message:
Backport from HEAD:
Ensured a user-sent content-type is correctly kept.
Added a test to check for that.


=== CMF/CMFCore/FSPageTemplate.py 1.8.8.4 => 1.8.8.5 ===
--- CMF/CMFCore/FSPageTemplate.py:1.8.8.4	Thu Sep  5 14:19:26 2002
+++ CMF/CMFCore/FSPageTemplate.py	Thu Sep  5 16:56:18 2002
@@ -159,11 +159,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:
-            if not response.headers.has_key('content-type'):
-                 response.setHeader('content-type', self.content_type)
         return result
  
     # Copy over more methods