Fix CalDAV: calendar-query REPORT returns invalid HTTP 404 when no events match the query
This commit is contained in:
@@ -1123,11 +1123,8 @@ impl PropFindRequestHandler for Server {
|
||||
);
|
||||
}
|
||||
|
||||
if !response.response.0.is_empty() || !query.sync_type.is_none() {
|
||||
if !is_propfind || !response.response.0.is_empty() || !query.sync_type.is_none() {
|
||||
Ok(HttpResponse::new(StatusCode::MULTI_STATUS).with_xml_body(response.to_string()))
|
||||
} else if !is_propfind {
|
||||
Ok(HttpResponse::new(StatusCode::MULTI_STATUS)
|
||||
.with_xml_body(MultiStatus::not_found(query.uri).to_string()))
|
||||
} else {
|
||||
Ok(HttpResponse::new(StatusCode::NOT_FOUND))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user