tags 753536 +patch thanks
The attached patch adds basic support for empty request bodies.
diff --git a/calypso/xmlutils.py b/calypso/xmlutils.py index 2f32dc9..6b3e8a8 100644 --- a/calypso/xmlutils.py +++ b/calypso/xmlutils.py @@ -84,10 +84,14 @@ def propfind(path, xml_request, collection, resource, depth, context): item_name = paths.resource_from_path(path) - # Reading request - root = ET.fromstring(xml_request) + if xml_request: + # Reading request + root = ET.fromstring(xml_request) + + prop_element = root.find(_tag("D", "prop")) + else: + prop_element = None - prop_element = root.find(_tag("D", "prop")) if prop_element is not None: prop_list = prop_element.getchildren() props = [prop.tag for prop in prop_list]