From: Lanius Trolling Date: Sun, 22 Dec 2024 20:53:49 +0000 (-0500) Subject: Improve dummy-lock handling better this time X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=f0b6030a4bf679a0446c61294b0ea7c18a7547c3;p=factbooks Improve dummy-lock handling better this time --- 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" } } } }