ucb/source/ucp/webdav-neon/webdavcontent.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 909b6b84944e17141109272d917dcf4887483e5a Author: Giuseppe Castagno <giuseppe.casta...@acca-esse.eu> Date: Sun Oct 2 10:58:52 2016 +0200 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. Change-Id: I765a2fe29f432a07a649e5a35440ae351c681af9 Reviewed-on: https://gerrit.libreoffice.org/29454 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Giuseppe Castagno <giuseppe.casta...@acca-esse.eu> diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx index e6153ff..8f0a83c 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx @@ -2292,7 +2292,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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits