From f0b6030a4bf679a0446c61294b0ea7c18a7547c3 Mon Sep 17 00:00:00 2001 From: Lanius Trolling Date: Sun, 22 Dec 2024 15:53:49 -0500 Subject: [PATCH] Improve dummy-lock handling better this time --- src/main/kotlin/info/mechyrdia/route/ResourceWebDav.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/info/mechyrdia/route/ResourceWebDav.kt b/src/main/kotlin/info/mechyrdia/route/ResourceWebDav.kt index c33a6df..1d0949a 100644 --- a/src/main/kotlin/info/mechyrdia/route/ResourceWebDav.kt +++ b/src/main/kotlin/info/mechyrdia/route/ResourceWebDav.kt @@ -362,8 +362,6 @@ suspend fun ApplicationCall.webDavLock(path: StoragePath) { if (request.header(HttpHeaders.ContentType) != null) receiveText() - val depth = request.header(HttpHeaders.Depth) ?: "Infinity" - respondXml { declaration() .root("prop", namespace = "DAV:") { @@ -371,12 +369,9 @@ suspend fun ApplicationCall.webDavLock(path: StoragePath) { "activelock" { "lockscope" { "shared"() } "locktype" { "write"() } - "depth" { +depth } + "depth" { +"0" } "owner"() - "timeout" { +"Second-86400" } - "locktoken" { - "href" { +"opaquelocktoken:${UUID.randomUUID()}" } - } + "timeout" { +"Second-31556925000" } } } } -- 2.25.1