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:
@@ -78,6 +78,11 @@ impl AppError {
|
||||
pub fn unsupported_media_type(message: impl Into<String>) -> Self {
|
||||
Self::new(StatusCode::UNSUPPORTED_MEDIA_TYPE, message, "UnsupportedMediaType")
|
||||
}
|
||||
|
||||
/// Create a 412 Precondition Failed error.
|
||||
pub fn precondition_failed(message: impl Into<String>) -> Self {
|
||||
Self::new(StatusCode::PRECONDITION_FAILED, message, "PreconditionFailed")
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DomainError> for AppError {
|
||||
|
||||
Reference in New Issue
Block a user