Skip to content

Commit

Permalink
- the rendered representation is not always unencoded
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Apr 25, 2019
1 parent f2bc2df commit f11dd73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/OFS/DTMLDocument.py
Expand Up @@ -101,7 +101,10 @@ def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
if 'content_type' in self.__dict__:
c = self.content_type
else:
c, e = guess_content_type(self.__name__, r.encode('utf-8'))
if isinstance(r, binary_type):
c, e = guess_content_type(self.__name__, r)
else:
c, e = guess_content_type(self.__name__, r.encode('utf-8'))
RESPONSE.setHeader('Content-Type', c)
result = decapitate(r, RESPONSE)
if not self._cache_namespace_keys:
Expand Down

0 comments on commit f11dd73

Please sign in to comment.