[Checkins]
SVN: CMF/branches/philikon-aq/CMFDefault/skins/zpt_generic/getMainGlobals.py
For some reason,
the Content-Type header isn't always set. This doesn't
Philipp von Weitershausen
philikon at philikon.de
Sun Aug 26 18:45:41 EDT 2007
Log message for revision 79292:
For some reason, the Content-Type header isn't always set. This doesn't
happen on the Zope trunk, just the philikon-aq branch. If somebody can tell
me why, I'd be glad :).
Anyway, just avoid a TypeError in here (getHeader will return None if the header
isn't present, so at least use the 'in' operator against an empty string).
Changed:
U CMF/branches/philikon-aq/CMFDefault/skins/zpt_generic/getMainGlobals.py
-=-
Modified: CMF/branches/philikon-aq/CMFDefault/skins/zpt_generic/getMainGlobals.py
===================================================================
--- CMF/branches/philikon-aq/CMFDefault/skins/zpt_generic/getMainGlobals.py 2007-08-26 22:43:58 UTC (rev 79291)
+++ CMF/branches/philikon-aq/CMFDefault/skins/zpt_generic/getMainGlobals.py 2007-08-26 22:45:40 UTC (rev 79292)
@@ -13,7 +13,7 @@
wtool = getToolByName(script, 'portal_workflow')
portal_object = utool.getPortalObject()
-if not 'charset' in context.REQUEST.RESPONSE.getHeader('content-type'):
+if not 'charset' in (context.REQUEST.RESPONSE.getHeader('content-type') or ''):
# Some newstyle views set a different charset - don't override it.
# Oldstyle views need the default_charset.
default_charset = ptool.getProperty('default_charset', None)
More information about the Checkins
mailing list