summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2023-02-23 15:50:49 +0100
committerLászló Németh <nemeth@numbertext.org>2023-03-07 18:01:52 +0000
commit03fe458efe59a810f885817abf2a574c0dda1dc2 (patch)
tree8404389cc41df2ef7a54f2e0aa4edeb598f179a2
parent36ed3cff62624b30e7cccdd0a4941c4bcb3a3ba6 (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
-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 972f70cbc17a..d5b255c175cd 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;