All checks were successful
continuous-integration/drone/push Build is passing
19 lines
726 B
Diff
19 lines
726 B
Diff
--- 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, "<"), ">")
|
|
}
|
|
|