[Zope-Checkins] CVS: Zope/lib/python/webdav - xmltools.py:1.13.6.1

Andreas Jung andreas@andreas-jung.com
Mon, 31 Mar 2003 12:36:00 -0500


Update of /cvs-repository/Zope/lib/python/webdav
In directory cvs.zope.org:/tmp/cvs-serv10610/lib/python/webdav

Modified Files:
      Tag: Zope-2_6-branch
	xmltools.py 
Log Message:

      - Collector #683: WeDAV request without XML preamble
        were not recognized by Zope and raised an exception.


=== Zope/lib/python/webdav/xmltools.py 1.13 => 1.13.6.1 ===
--- Zope/lib/python/webdav/xmltools.py:1.13	Wed Aug 14 18:11:40 2002
+++ Zope/lib/python/webdav/xmltools.py	Mon Mar 31 12:35:59 2003
@@ -294,6 +294,10 @@
         self.node=None
 
     def parse(self, data):
+        # prepending a XML preample to make xmllib happy
+        # (Collector #863)
+        if not data.startswith("<?xml"):   
+            data = '<?xml version="1.0" ?>\n' + data
         self.feed(data)
         self.close()
         return self.root