From 40217a1360162031b68c68d64d570ca92dde5e9d Mon Sep 17 00:00:00 2001 From: Georgiy Date: Wed, 16 Jul 2025 23:26:40 +0300 Subject: [PATCH] Return empty REPORT response if no items found --- radicale/app/report.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/radicale/app/report.py b/radicale/app/report.py index 8f77c97b..c58e8e78 100644 --- a/radicale/app/report.py +++ b/radicale/app/report.py @@ -349,9 +349,11 @@ def xml_report(base_prefix: str, path: str, xml_request: Optional[ET.Element], assert item.href uri = pathutils.unstrip_path( posixpath.join(collection.path, item.href)) - multistatus.append(xml_item_response( - base_prefix, uri, found_props=found_props, - not_found_props=not_found_props, found_item=True)) + + if found_props or not_found_props: + multistatus.append(xml_item_response( + base_prefix, uri, found_props=found_props, + not_found_props=not_found_props, found_item=True)) return client.MULTI_STATUS, multistatus