feat(nc-webdav): generic dead-props on PROPPATCH/PROPFIND/REPORT

NC PROPPATCH only special-cased oc:favorite, silently dropped every
other prop while claiming 200. PROPFIND had no dead-prop lookup at
all. Reuse native /webdav/ dead-prop plumbing (now pub(crate)) so NC
surface gets real RFC 4918 §4.2 storage. Missing resource on
PROPPATCH is now 404 instead of a fake success no-op.
This commit is contained in:
M.Schmidt
2026-07-01 19:59:16 +02:00
parent 650d388b4e
commit f220217659
4 changed files with 159 additions and 136 deletions
@@ -1092,7 +1092,11 @@ async fn resolve_or_legacy(
/// the dead-prop lookup is broken; surfacing a 500 here would mask the
/// resource entirely from sync clients. The legacy path-keyed lookup
/// behaved the same way (`.unwrap_or_default()`); we preserve it.
async fn file_dead_props(
///
/// `pub(crate)` — also reused by the NextCloud-compatible PROPFIND
/// handler (`interfaces::nextcloud::webdav_handler`), which needs the
/// same lenient fetch for its own response writers.
pub(crate) async fn file_dead_props(
state: &Arc<AppState>,
file: &FileDto,
) -> Vec<(QualifiedName, Option<String>)> {
@@ -1107,8 +1111,9 @@ async fn file_dead_props(
}
/// Same shape as `file_dead_props` but for folder rows. Used by the
/// streaming PROPFIND walker.
async fn folder_dead_props(
/// streaming PROPFIND walker (and, via `pub(crate)`, by the NextCloud
/// handler's own streaming walker).
pub(crate) async fn folder_dead_props(
store: &DeadPropertyStore,
folder: &FolderDto,
) -> Vec<(QualifiedName, Option<String>)> {
@@ -1124,7 +1129,7 @@ async fn folder_dead_props(
/// File-leaf variant for the streaming walker (takes a `&DeadPropertyStore`
/// rather than the full `&Arc<AppState>` so it can be called from inside
/// the async-stream future without cloning state).
async fn streamed_file_dead_props(
pub(crate) async fn streamed_file_dead_props(
store: &DeadPropertyStore,
file: &FileDto,
) -> Vec<(QualifiedName, Option<String>)> {