fix: resolve CalDAV PROPFIND returning empty property values (#153)

Root cause: XML namespace prefixes (e.g. "D", "C") were not being
resolved to their actual namespace URIs (e.g. "DAV:",
"urn:ietf:params:xml:ns:caldav") during PROPFIND parsing. This caused
all property match arms to fall through to the catch-all, producing
empty XML elements.

Changes:
- Add namespace-aware XML parsing (collect_ns_decls + resolve_name) to
  WebDavAdapter, used by all DAV protocol parsers (WebDAV, CalDAV,
  CardDAV)
- Add /.well-known/caldav -> /caldav/ redirect (RFC 6764)
- Add root /caldav/ PROPFIND response with current-user-principal and
  calendar-home-set discovery properties
- Add /caldav/principals/{username}/ PROPFIND handler (was 500 error)
- Add /caldav/{username}/ user calendar home handler (calendar-home-set
  target)
- Respect Depth header at root: depth 0 returns only root entry, depth
  1+ includes calendar children
- Fix pre-existing TRANSCODE_POOL_THREADS test compilation error
- Add 8 new tests covering namespace resolution, discovery properties,
  and principal responses

https://claude.ai/code/session_01T49VBJSimgo28APxbucHzq
This commit is contained in:
Claude
2026-03-02 20:40:41 +00:00
parent 991a98b1fc
commit b9de342223
7 changed files with 879 additions and 81 deletions
@@ -498,6 +498,6 @@ mod tests {
fn test_transcode_pool_initializes() {
// Verify the pool can be created without panic
let pool = transcode_pool();
assert_eq!(pool.current_num_threads(), TRANSCODE_POOL_THREADS);
assert_eq!(pool.current_num_threads(), transcode_thread_count());
}
}