ucb/source/ucp/webdav-curl/DAVTypes.cxx |   53 --------------------------------
 ucb/source/ucp/webdav-curl/DAVTypes.hxx |   16 ---------
 2 files changed, 69 deletions(-)

New commits:
commit 09e159ba18989f8b5720205f0bdebdb277c5d067
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Oct 12 14:58:05 2021 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Nov 1 18:52:45 2021 +0100

    ucb: webdav-curl: loplugin:unusedmethods
    
    [ replicate commit 292560a957498bed70b625c992ec6bcf631dceb3 ]
    
    Change-Id: I17a719756423f57a847d5c2f6833ac4d7033f5f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123500
    Tested-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index 82be1807ed41..015c3520bf73 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -173,31 +173,6 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
     m_aTheCache[ aEncodedUrl ] = rDAVOptions;
 }
 
-sal_uInt16 DAVOptionsCache::getHttpResponseStatusCode( const OUString & rURL, 
OUString & rHttpResponseStatusText )
-{
-    osl::MutexGuard aGuard( m_aMutex );
-    OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
-    normalizeURLLastChar( aEncodedUrl );
-
-    DAVOptionsMap::iterator it;
-    it = m_aTheCache.find( aEncodedUrl );
-    if ( it != m_aTheCache.end() )
-    {
-        // first check for stale
-        TimeValue t1;
-        osl_getSystemTime( &t1 );
-        if( (*it).second.getStaleTime() < t1.Seconds )
-        {
-            m_aTheCache.erase( it );
-            return 0;
-        }
-
-        rHttpResponseStatusText = (*it).second.getHttpResponseStatusText();
-        return (*it).second.getHttpResponseStatusCode();
-    }
-    return 0;
-}
-
 void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool 
HeadAllowed )
 {
     osl::MutexGuard aGuard( m_aMutex );
@@ -221,32 +196,4 @@ void DAVOptionsCache::setHeadAllowed( const OUString & 
rURL, const bool HeadAllo
     }
 }
 
-bool DAVOptionsCache::isHeadAllowed( const OUString & rURL )
-{
-    osl::MutexGuard aGuard( m_aMutex );
-    OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
-    normalizeURLLastChar( aEncodedUrl );
-
-    DAVOptionsMap::iterator it;
-    it = m_aTheCache.find( aEncodedUrl );
-    if ( it != m_aTheCache.end() )
-    {
-        // first check for stale
-        TimeValue t1;
-        osl_getSystemTime( &t1 );
-        if( (*it).second.getStaleTime() < t1.Seconds )
-        {
-            m_aTheCache.erase( it );
-            return true; // to force again OPTIONS method
-        }
-
-        // check if the resource was present on server
-        return (*it).second.isHeadAllowed();
-    }
-    // this value is needed because some web server don't implement
-    // OPTIONS method, so the resource is considered found,
-    // until detected otherwise
-    return true;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
index 77e9d630bc0c..cf87b0b1cf45 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -170,22 +170,6 @@ namespace http_dav_ucp
         void removeDAVOptions( const OUString & rURL );
         void addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 
nLifeTime );
 
-        /** return the cached value of HTTP response status code
-            If the cached value is found stale, it is removed.
-
-            @param (in) OUString
-                   the resource URL
-
-            @return int
-                    the cached
-                    are not present (meaning the resource should be checked for
-                    presence anyway)
-                    false if resource was not found
-        */
-        sal_uInt16 getHttpResponseStatusCode( const OUString & rURL, OUString 
& rHttpResponseStatusText );
-
-        bool isHeadAllowed( const OUString & rURL );
-
         void setHeadAllowed( const OUString & rURL, bool HeadAllowed = true );
 
     private:

Reply via email to