WebDAV: Always return MULTISTATUS when calendar-query yields no results

This commit is contained in:
mdecimus
2025-07-24 12:36:17 +02:00
parent 4d819a1041
commit 02f6a114e0
6 changed files with 59 additions and 21 deletions

View File

@@ -80,6 +80,15 @@ impl MultiStatus {
self
}
pub fn not_found(href: impl Into<String>) -> Self {
let mut response = Self::new(Vec::with_capacity(1));
response.response.0.push(
Response::new_status([href], StatusCode::NOT_FOUND)
.with_response_description("No resources found"),
);
response
}
pub fn add_response(&mut self, response: Response) {
self.response.0.push(response);
}