Commit 4134bb9c authored by Andreas Jung's avatar Andreas Jung

fix

parent e6d702c5
...@@ -337,6 +337,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -337,6 +337,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
security.declareProtected(change_page_templates, 'PUT') security.declareProtected(change_page_templates, 'PUT')
def PUT(self, REQUEST, RESPONSE): def PUT(self, REQUEST, RESPONSE):
""" Handle HTTP PUT requests """ """ Handle HTTP PUT requests """
self.dav__init(REQUEST, RESPONSE) self.dav__init(REQUEST, RESPONSE)
self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1) self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
text = REQUEST.get('BODY', '') text = REQUEST.get('BODY', '')
...@@ -407,7 +408,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable, ...@@ -407,7 +408,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
# Perform on-the-fly migration to unicode. # Perform on-the-fly migration to unicode.
# Perhaps it might be work with the 'generation' module here? # Perhaps it might be work with the 'generation' module here?
if not isinstance(state['_text'], unicode): if not isinstance(state['_text'], unicode):
text, encoding = convertToUnicode(state['_text'], state['content_type']) text, encoding = convertToUnicode(state['_text'], state.get('content_type', 'text/html'))
state['_text'] = text state['_text'] = text
state['output_encoding'] = encoding state['output_encoding'] = encoding
self.__dict__.update(state) self.__dict__.update(state)
......
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