[CMF-checkins] CVS: CMF - Document.py:1.9
Jeffrey Shell
jeffrey@digicool.com
Mon, 21 May 2001 18:34:26 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDefault
In directory korak.digicool.com:/home/jeffrey/InstanceHomes/cmf-dev/CMF/CMFDefault
Modified Files:
Document.py
Log Message:
Oops. Foolishly removed check on REQUEST's "Content-Type" header in
PUT. Now it's back.
--- Updated File Document.py in package CMF --
--- Document.py 2001/05/21 22:00:12 1.8
+++ Document.py 2001/05/21 22:34:26 1.9
@@ -259,7 +259,8 @@
self.dav__init(REQUEST, RESPONSE)
body = REQUEST.get('BODY', '')
bodyfound = bodyfinder.search(body)
- ishtml = (text_format == 'html') or (bodyfound is not None)
+ guessedformat = REQUEST.get_header('Content-Type', 'text/plain')
+ ishtml = (guessedformat == 'text/html') or (bodyfound is not None)
if ishtml: self.setFormat('text/html')
else: self.setFormat('text/plain')