[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.9.16.4 ZopePageTemplate.py:1.29.10.4
Florent Guillaume
fg@nuxeo.com
Sun, 8 Sep 2002 13:49:25 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv12367/lib/python/Products/PageTemplates
Modified Files:
Tag: Zope-2_5-branch
PageTemplateFile.py ZopePageTemplate.py
Log Message:
Backport Content-Type fixes from HEAD:
Only set the 'content-type' header if one doesn't already exist in the
response.
=== Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.9.16.3 => 1.9.16.4 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.9.16.3 Wed Feb 27 14:13:03 2002
+++ Zope/lib/python/Products/PageTemplates/PageTemplateFile.py Sun Sep 8 13:49:25 2002
@@ -83,8 +83,9 @@
bound_names['options'] = kw
try:
- self.REQUEST.RESPONSE.setHeader('content-type',
- self.content_type)
+ response = self.REQUEST.RESPONSE
+ if not response.headers.has_key('content-type'):
+ response.setHeader('content-type', self.content_type)
except AttributeError: pass
# Execute the template in a new security context.
=== Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.29.10.3 => 1.29.10.4 ===
--- Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py:1.29.10.3 Wed Apr 17 17:33:41 2002
+++ Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py Sun Sep 8 13:49:25 2002
@@ -185,8 +185,9 @@
bound_names['options'] = kw
try:
- self.REQUEST.RESPONSE.setHeader('content-type',
- self.content_type)
+ response = self.REQUEST.RESPONSE
+ if not response.headers.has_key('content-type'):
+ response.setHeader('content-type', self.content_type)
except AttributeError: pass
security=getSecurityManager()