ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx | 26 ++++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-)
New commits: commit 78992a2b63cdfbc278a104973c22b1e707ecfd12 Author: Giuseppe Castagno <giuseppe.casta...@acca-esse.eu> AuthorDate: Mon Jan 11 16:35:34 2016 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Nov 1 18:35:58 2021 +0100 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.st...@allotropia.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> 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 & ) + { + } } }