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>
diff --git a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
index d89f943..e45156c 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 & )
{
}
}
}