[Libreoffice-commits] core.git: ucb/source

Giuseppe Castagno giuseppe.castagno at acca-esse.eu
Sun Jul 31 13:21:59 UTC 2016


 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   41 ---------------------------
 1 file changed, 41 deletions(-)

New commits:
commit d5f4bcb2c10ca40ce853b96398e60aead8809621
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date:   Sun Jul 31 09:46:27 2016 +0000

    Revert "tdf#101094 (20) OPTIONS: Add mechanism to manage not found Web URL: HEAD"
    
    This reverts commit 0acd13ec38fad1a63b86d2428299e469227a9069.
    
    Because it introduces a bug in saving a new file on a WebDAV
    server.
    Need to find a better solution.
    
    Change-Id: Ie353fac7203d599989ca67cf89c81c1a95f5b47e
    Reviewed-on: https://gerrit.libreoffice.org/27744
    Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
    Tested-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 42e3335..902bc76 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1287,39 +1287,12 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 
         // Obtain values from server...
 
-        // save original target URL (not redirected)
-        OUString aTargetURL( xResAccess->getURL() );
 
         // First, identify whether resource is DAV or not
         bool bNetworkAccessAllowed = true;
         ResourceType eType = getResourceType(
             xEnv, xResAccess, &bNetworkAccessAllowed );
 
-        // check if the resource was not found in a former try
-        // the result is cached for a time of 'OptsCacheLifeNotFound' seconds,
-        // normally a short time
-        if ( !aStaticDAVOptionsCache.isResourceFound( aTargetURL ) )
-        {
-            // file was not found during a previous access
-            // return exception as if the resource was not found
-            SAL_WARN( "ucb.ucp.webdav", " URL <" << aTargetURL << "> was not found prevoiusly (was cached)" );
-            uno::Sequence< uno::Any > aArgs( 1 );
-            aArgs[ 0 ] <<= beans::PropertyValue(
-                OUString("Uri"), -1,
-                uno::makeAny(aTargetURL),
-                beans::PropertyState_DIRECT_VALUE);
-
-            ucbhelper::cancelCommandExecution(
-                uno::makeAny(
-                    ucb::InteractiveAugmentedIOException(
-                        OUString("Not found!"),
-                        static_cast< cppu::OWeakObject * >( this ),
-                        task::InteractionClassification_ERROR,
-                        ucb::IOErrorCode_NOT_EXISTING,
-                        aArgs ) ),
-                xEnv );
-        }
-
         if ( eType == DAV )
         {
             // cache lookup... getResourceType may fill the props cache via
@@ -1510,20 +1483,6 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
                         bNetworkAccessAllowed
                             = shouldAccessNetworkAfterException( e );
 
-                        // check if error is SC_NOT_FOUND
-                        // if URL resource not found, set the corresponding resource
-                        // element in option cache and update the cache lifetime accordingly
-                        if( e.getStatus() == SC_NOT_FOUND )
-                        {
-                            DAVOptions aDAVOptions;
-                            if( aStaticDAVOptionsCache.getDAVOptions( aTargetURL, aDAVOptions ) )
-                            {
-                                aDAVOptions.setResourceFound( false );
-                                aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
-                                                                      m_nOptsCacheLifeNotFound );
-                            }
-                        }
-
                         if ( !bNetworkAccessAllowed )
                         {
                             cancelCommandExecution( e, xEnv );


More information about the Libreoffice-commits mailing list