summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2023-02-23 15:50:49 +0100
committerAndras Timar <andras.timar@collabora.com>2023-03-10 14:10:50 +0100
commit0e730e0adac55baebf22d87117d6da96c7567806 (patch)
treed55b726f81c0544c04390d52988939e44d9c93e7 /ucb
parent399ec339f842646e29529c7f7c44583750d35895 (diff)
tdf#153642 ucb: fix broken save with cached DAVOptions
Trying to save a document within the lifetime of the cached connection, e.g. re-save within a few seconds after the first and successful save failed with an error message in the case of Vibe 4.0.6 WebDAV server. Waiting 5-10 seconds after the last try was the only workaround to re-save the document. Details: aDAVOptionsException in Content::getPropertyValues() removed the isClass1 bit of the cached DAVOptions of the same TargetURL (note: of the folder of the WebDAV document). This disabled the DAV detection part of Content::getResourceType(), and later the correct HTTP redirect for the DAV connection. Fix this by keeping the cached bit in that case, too, when the added connection has a different lifetime, than the cached one. Follow-up to commit 30ca48f4dc0e65a3798e6b21574bc80f6d4953fa "tdf#152493 ucb WebDAV: fix upload using HTTP 1.0 fallback". Change-Id: I5d4578232581a4df654f76198fdddf096cba5267 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147570 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit d6182cb6704c06f33d284874b9fe96c85cce5bf5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147606 Tested-by: Jenkins
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-curl/DAVTypes.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index 015c3520bf73..1bdd4f6ff5bd 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -164,6 +164,11 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32
{ // already in cache, check LifeTime
if ( (*it).second.getRequestedTimeLife() == nLifeTime )
return; // same lifetime, do nothing
+
+ // tdf#153642 keep cached Class1 bit at aDAVOptionsException to avoid of
+ // losing the ability to resave the document within the lifetime because
+ // of disabled DAV detection in getResourceType()
+ rDAVOptions.setClass1( (*it).second.isClass1() );
}
// not in cache, add it
TimeValue t1;