Return HTTP status in xmlutils.propfind
This commit is contained in:
parent
8d863e52b2
commit
6515062bcd
@ -532,9 +532,12 @@ class Application:
|
||||
items = itertools.chain([item], items)
|
||||
read_items, write_items = self.collect_allowed_items(items, user)
|
||||
headers = {"DAV": DAV_HEADERS, "Content-Type": "text/xml"}
|
||||
answer = xmlutils.propfind(
|
||||
status, answer = xmlutils.propfind(
|
||||
path, content, read_items, write_items, user)
|
||||
return client.MULTI_STATUS, headers, answer
|
||||
if status == client.FORBIDDEN:
|
||||
return NOT_ALLOWED
|
||||
else:
|
||||
return status, headers, answer
|
||||
|
||||
def do_PROPPATCH(self, environ, path, user):
|
||||
"""Manage PROPPATCH request."""
|
||||
|
@ -524,7 +524,7 @@ def propfind(path, xml_request, read_collections, write_collections, user):
|
||||
path, collection, props, user, write=False)
|
||||
multistatus.append(response)
|
||||
|
||||
return _pretty_xml(multistatus)
|
||||
return client.MULTI_STATUS, _pretty_xml(multistatus)
|
||||
|
||||
|
||||
def _propfind_response(path, item, props, user, write=False):
|
||||
|
Loading…
Reference in New Issue
Block a user