ucb: webdav-curl: tdf#101094 (35): Add OPTIONS as pre-check in direct WebDAV open() method
The function call will act as a precheck on Web resource access
error when accessing the open directly without the normal file
open procedure, e.g. accessing Web resource property values first.
An example of this direct open call are the extension fetching and
the extension update check.
[ port of commit 909b6b84944e17141109272d917dcf4887483e5a ]
Change-Id: Ic04903cfc1b056e150a080fc32428d43e3f842e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123494
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 331ca1a..d421d9a 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -2163,7 +2163,15 @@ uno::Any Content::open(
removeCachedPropertyNames( xResAccess->getURL() );
// check if the resource was present on the server
if( aStaticDAVOptionsCache.isResourceFound( aTargetURL ) )
// first update it, if necessary
// if the open is called directly, without the default open sequence,
// e.g. the one used when opening a file looking for properties
// first this call will have no effect, since OPTIONS would have already been called
// as a consequence of getPropertyValues()
DAVOptions aDAVOptions;
getResourceOptions( xEnv, aDAVOptions, xResAccess );
if( aDAVOptions.isResourceFound() )
{
uno::Reference< io::XInputStream > xIn
= xResAccess->GET( aHeaders, aResource, xEnv );