Missing file in previous commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-12-10 21:49:58 +01:00
parent 40f0726fbb
commit 9144e3aa4b

View File

@@ -0,0 +1,18 @@
--- a/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/locks.go
+++ b/vendor/github.com/cs3org/reva/v2/internal/http/services/owncloud/ocdav/locks.go
@@ -649,5 +649,13 @@ func (s *svc) unlockReference(ctx context.Context, _ http.ResponseWriter, r *htt
}
func requestLockToken(r *http.Request) string {
- return strings.TrimSuffix(strings.TrimPrefix(r.Header.Get(net.HeaderLockToken), "<"), ">")
+ h := r.Header.Get(net.HeaderLockToken)
+ if len(h) == 0 {
+ h = r.Header.Get(net.HeaderIf)
+ if untagged := strings.Index(h, "(<"); untagged > 0 {
+ h = h[untagged:]
+ }
+ h = strings.TrimSuffix(strings.TrimPrefix(h, "("), ")")
+ }
+ return strings.TrimSuffix(strings.TrimPrefix(h, "<"), ">")
}