Commit 3cb6bdd6 authored by Chris McDonough's avatar Chris McDonough

Only set the 'content-type' header if one doesn't already exist in the

response.
parent 042f0abc
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template. Zope object encapsulating a Page Template.
""" """
__version__='$Revision: 1.42 $'[11:-2] __version__='$Revision: 1.43 $'[11:-2]
import os, AccessControl, Acquisition, sys import os, AccessControl, Acquisition, sys
from types import StringType from types import StringType
...@@ -202,8 +202,9 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -202,8 +202,9 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
bound_names['options'] = kw bound_names['options'] = kw
try: try:
self.REQUEST.RESPONSE.setHeader('content-type', response = self.REQUEST.RESPONSE
self.content_type) if not response.headers.has_key('content-type'):
response.setHeader('content-type', self.content_type)
except AttributeError: except AttributeError:
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment