accepts PROPFIND whitout request body
This commit is contained in:
parent
dd94660ef0
commit
9972897d75
@ -195,10 +195,18 @@ def propfind(path, xml_request, collections, user=None):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
# Reading request
|
# Reading request
|
||||||
root = ET.fromstring(xml_request.encode("utf8"))
|
if xml_request:
|
||||||
|
root = ET.fromstring(xml_request.encode("utf8"))
|
||||||
|
|
||||||
prop_element = root.find(_tag("D", "prop"))
|
prop_element = root.find(_tag("D", "prop"))
|
||||||
props = [prop.tag for prop in prop_element]
|
props = [prop.tag for prop in prop_element]
|
||||||
|
else:
|
||||||
|
props = [ _tag("D", "getcontenttype"),
|
||||||
|
_tag("D", "resourcetype"),
|
||||||
|
_tag("D", "displayname"),
|
||||||
|
_tag("D", "owner"),
|
||||||
|
_tag("D", "getetag"),
|
||||||
|
_tag("CS", "getctag") ]
|
||||||
|
|
||||||
# Writing answer
|
# Writing answer
|
||||||
multistatus = ET.Element(_tag("D", "multistatus"))
|
multistatus = ET.Element(_tag("D", "multistatus"))
|
||||||
|
Loading…
Reference in New Issue
Block a user