diff --git a/src-tauri/src/services/webdav_sync.rs b/src-tauri/src/services/webdav_sync.rs index 7228c80d5..b7309b697 100644 --- a/src-tauri/src/services/webdav_sync.rs +++ b/src-tauri/src/services/webdav_sync.rs @@ -31,6 +31,12 @@ pub(crate) fn sync_mutex() -> &'static tokio::sync::Mutex<()> { pub(crate) mod archive; +/// Content type for the manifest PUT. Some WebDAV servers (e.g. CSTCloud +/// Data Capsule) reject multi-line bodies sent as `application/json` with a +/// size-mismatch 500, while accepting the same bytes as a generic binary. +/// The bytes are unchanged, so readers of any version are unaffected. +const MANIFEST_CONTENT_TYPE: &str = "application/octet-stream"; + struct RemoteSnapshot { layout: RemoteLayout, manifest: SyncManifest, @@ -73,7 +79,7 @@ pub async fn upload( &manifest_url, &auth, snapshot.manifest_bytes, - "application/json", + MANIFEST_CONTENT_TYPE, ) .await?;