summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-10-21 21:08:38 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-01 18:55:22 +0100
commit3f2c3acfac2c699820f1a7e66a485ad98d5d92ab (patch)
treedcdafa6e4526e082188b7289e362ec576f12c48d /ucb
parentf529a81a6158de68c0a244640f8ee6434e6e79a6 (diff)
ucb: webdav-curl: handle "depth" in WebDAVResponseParser
Also remove a spurious fall-through that probably doesn't matter in practice because the "status" element follows the "prop" element that contains "activelock" in the schema so at that time maStatus should always be empty for a valid response. Change-Id: If4cc8dbc75391d76ff497b83dd0f7fd00eb34a33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124076 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-curl/webdavresponseparser.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
index 1c24d63200a3..4b6d0f848b66 100644
--- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
@@ -80,6 +80,7 @@ namespace
WebDAVName_supportedlock,
WebDAVName_lockentry,
WebDAVName_lockscope,
+ WebDAVName_depth,
WebDAVName_locktoken,
WebDAVName_exclusive,
WebDAVName_locktype,
@@ -115,6 +116,7 @@ namespace
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("supportedlock"), WebDAVName_supportedlock));
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockentry"), WebDAVName_lockentry));
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockscope"), WebDAVName_lockscope));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("depth"), WebDAVName_depth));
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktoken"), WebDAVName_locktoken));
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("exclusive"), WebDAVName_exclusive));
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktype"), WebDAVName_locktype));
@@ -705,13 +707,30 @@ namespace
}
break;
}
+ case WebDAVName_depth:
+ {
+ OUString const chars(mpContext->getWhiteSpace());
+ if (chars == "0")
+ {
+ maLock.Depth = ucb::LockDepth_ZERO;
+ }
+ else if (chars == "1")
+ {
+ maLock.Depth = ucb::LockDepth_ONE;
+ }
+ else if (chars == "infinity")
+ {
+ maLock.Depth = ucb::LockDepth_INFINITY;
+ }
+ break;
+ }
case WebDAVName_activelock:
{
maLock.Type = maLockType;
maLock.Scope = maLockScope;
maResult_Lock.push_back(maLock);
+ break;
}
- [[fallthrough]]; // I hope intentional?
case WebDAVName_propstat:
{
// propstat end, check status