fix(webdav): fully working WebDAV RFC 4918 implementation
- Move WebDAV routes to top-level (out of /api nest) for proper path handling - Add trailing slash routes and HEAD method support - Refactor all 12 handlers to use Axum State extractor instead of req.extensions() - Fix MOVE handler to support rename (same-folder move) via rename_file service - Add Overwrite header support in MOVE/COPY operations - Add extract_webdav_path() helper for consistent path parsing - Add precondition_failed variant to AppError - All 17 integration tests passing: OPTIONS, PROPFIND, MKCOL, PUT, GET, HEAD, PROPPATCH, COPY, MOVE, LOCK, DELETE (files and folders)
This commit is contained in:
@@ -276,11 +276,8 @@ pub fn create_api_routes(app_state: &AppState) -> Router<AppState> {
|
||||
tracing::warn!("Trash service not available - trash view will not work");
|
||||
}
|
||||
|
||||
// Add WebDAV routes
|
||||
{
|
||||
use crate::interfaces::api::handlers::webdav_handler;
|
||||
router = router.merge(webdav_handler::webdav_routes());
|
||||
}
|
||||
// NOTE: WebDAV routes are mounted at top-level (/webdav) in main.rs
|
||||
// for client compatibility, NOT under /api.
|
||||
|
||||
// NOTE: CalDAV and CardDAV routes are mounted at top-level (/caldav, /carddav)
|
||||
// in main.rs for protocol compliance, NOT under /api.
|
||||
|
||||
Reference in New Issue
Block a user