mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-04 17:54:20 +08:00
Always returns MULTISTATUS on WebDAV REPORT responses
This commit is contained in:
parent
861471fde4
commit
c1a638c19e
1 changed files with 8 additions and 0 deletions
|
@ -319,12 +319,14 @@ impl PropFindRequestHandler for Server {
|
|||
self.core.groupware.max_results,
|
||||
);
|
||||
let mut is_sync_limited = false;
|
||||
let mut is_propfind = false;
|
||||
|
||||
let paths = match std::mem::take(&mut query.resource) {
|
||||
DavQueryResource::Uri(resource) => {
|
||||
collection_container = resource.collection;
|
||||
collection_children = collection_container.child_collection().unwrap();
|
||||
sync_collection = SyncCollection::from(collection_container);
|
||||
is_propfind = true;
|
||||
|
||||
get(
|
||||
self,
|
||||
|
@ -1124,6 +1126,12 @@ impl PropFindRequestHandler for Server {
|
|||
|
||||
if !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 {
|
||||
response.add_response(
|
||||
Response::new_status([query.uri], StatusCode::NOT_FOUND)
|
||||
.with_response_description("No resources found"),
|
||||
);
|
||||
Ok(HttpResponse::new(StatusCode::MULTI_STATUS).with_xml_body(response.to_string()))
|
||||
} else {
|
||||
Ok(HttpResponse::new(StatusCode::NOT_FOUND))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue