diff options
author | László Németh <nemeth@numbertext.org> | 2023-02-23 15:50:49 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2023-02-24 09:43:55 +0000 |
commit | d6182cb6704c06f33d284874b9fe96c85cce5bf5 (patch) | |
tree | 7dae06dd37b9eda294a532ce1309bbae946bef1b /ucb/source/ucp | |
parent | 6068ae5df9da179e1d187e27117a9d761116f968 (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>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/webdav-curl/DAVTypes.cxx | 5 |
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; |