mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-06 22:57:36 +03:00
Merge branch 'rights' of https://github.com/Unrud/Radicale into Unrud-rights
This commit is contained in:
commit
92a0027ae1
5 changed files with 292 additions and 314 deletions
|
@ -472,20 +472,13 @@ def props_from_request(root, actions=("set", "remove")):
|
|||
return result
|
||||
|
||||
|
||||
def delete(path, collection):
|
||||
def delete(path, collection, href=None):
|
||||
"""Read and answer DELETE requests.
|
||||
|
||||
Read rfc4918-9.6 for info.
|
||||
|
||||
"""
|
||||
# Reading request
|
||||
if collection.path == path.strip("/"):
|
||||
# Delete the whole collection
|
||||
collection.delete()
|
||||
else:
|
||||
# Remove an item from the collection
|
||||
collection.delete(name_from_path(path, collection))
|
||||
|
||||
collection.delete(href)
|
||||
# Writing answer
|
||||
multistatus = ET.Element(_tag("D", "multistatus"))
|
||||
response = ET.Element(_tag("D", "response"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue