diff options
author | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-01-11 16:35:34 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-11-01 18:35:58 +0100 |
commit | 78992a2b63cdfbc278a104973c22b1e707ecfd12 (patch) | |
tree | 9c725d75d2496ee6c07cc359115d4689f62c10a5 /ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx | |
parent | cb0681be80bd4423475149e05eaff180887936c8 (diff) |
ucb: webdav-curl: tdf#101094 (9) OPTIONS: Add options check in Content::getProperties
[ port of commit be47f60b51c053c6329637e829ce16e2e90610fe ]
Change-Id: I8fd0dbc1f9847e799c244821bfe4e628c39c2017
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123291
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx')
-rw-r--r-- | ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx index d89f9431b6d4..e45156c35a0d 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx @@ -286,18 +286,24 @@ uno::Sequence< beans::Property > Content::getProperties( if ( !bTransient ) { // Obtain all properties supported for this resource from server. - try + DAVOptions aDAVOptions; + getResourceOptions( xEnv, aDAVOptions, xResAccess ); + // only Class 1 is needed for PROPFIND + if ( aDAVOptions.isClass1() ) { - std::vector< DAVResourceInfo > props; - xResAccess->PROPFIND( DAVZERO, props, xEnv ); + try + { + std::vector< DAVResourceInfo > props; + xResAccess->PROPFIND( DAVZERO, props, xEnv ); - // Note: vector always contains exactly one resource info, because - // we used a depth of DAVZERO for PROPFIND. - aPropSet.insert( (*props.begin()).properties.begin(), - (*props.begin()).properties.end() ); - } - catch ( DAVException const & ) - { + // Note: vector always contains exactly one resource info, because + // we used a depth of DAVZERO for PROPFIND. + aPropSet.insert( (*props.begin()).properties.begin(), + (*props.begin()).properties.end() ); + } + catch ( DAVException const & ) + { + } } } |