summaryrefslogtreecommitdiff
path: root/ucb/source
AgeCommit message (Collapse)Author
2021-11-01ucb: webdav-curl: fix MOVE/COPY/DELETE crashMichael Stahl
These need "nobody"; some errors like 401 will return a body that should be ignored. Change-Id: If2f726aa34d4d3fae1bd61bc87b62e2d55a7ff26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124561 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: rewrite authentication loop for reentrancyMichael Stahl
Surprisingly calling authenticate() can lead to a reentrant call via event loop, which fortunately deadlocks with non-recusive mutex, or we'd have a much more difficult to debug problem: 5 std::unique_lock<std::mutex>::unique_lock() 7 http_dav_ucp::CurlProcessor::PropFind() 8 http_dav_ucp::CurlSession::PROPFIND() (this=0x391fe80, rURIReference="/testL.odt", depth=http_dav_ucp::DAVZERO, o_rResourceInfos=std::__debug::vector of length 0, capacity 0, rEnv=...) 9 http_dav_ucp::DAVResourceAccess::PROPFIND() (this=0xab3bb00, nDepth=http_dav_ucp::DAVZERO, rResInfo=std::__debug::vector of length 0, capacity 0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 10 http_dav_ucp::Content::getProperties() (this=0xa8ba9a0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 15 SfxBaseModel::isVersionable() (this=0x7159c90) 19 SfxBindings::Update_Impl(SfxStateCache&) 24 Timer::Invoke() (this=0x7394708) 30 g_main_loop_run () 35 (anonymous namespace)::executeMasterPasswordDialog() 40 (anonymous namespace)::UUIInteractionHandler::handle() 41 PasswordContainer::RequestPasswordFromUser() 42 PasswordContainer::GetMasterPassword() 47 PasswordContainer::find() 48 uui::PasswordContainerHelper::handleAuthenticationRequest() 57 ucbhelper::InterceptedInteraction::handle() 58 http_dav_ucp::DAVAuthListener_Impl::authenticate() 59 http_dav_ucp::CurlProcessor::ProcessRequestImpl() 60 http_dav_ucp::CurlProcessor::ProcessRequest() 61 http_dav_ucp::CurlProcessor::PropFind() 62 http_dav_ucp::CurlSession::PROPFIND() (this=0x391fe80, rURIReference="/testL.odt", depth=http_dav_ucp::DAVZERO, o_rResourceInfos=std::__debug::vector of length 0, capacity 0, rEnv=...) 63 http_dav_ucp::DAVResourceAccess::PROPFIND() (this=0xab8c060, nDepth=http_dav_ucp::DAVZERO, rResInfo=std::__debug::vector of length 0, capacity 0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 64 http_dav_ucp::Content::getProperties() (this=0xa8ba9a0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 67 ucbhelper::PropertySetInfo::hasPropertyByName() (this=0xa8d7a20, Name="TitleOnServer") 68 SfxBaseModel::getTitle() 74 framework::TitleHelper::impl_updateTitle() 75 framework::TitleHelper::documentEventOccured() 78 SfxBaseModel::postEvent_Impl() (this=0x7159c90, aName="OnModeChanged", xController=empty uno::Reference) 79 SfxBaseModel::Notify() 80 SfxBroadcaster::Broadcast() 81 SfxObjectShell::SetModalMode_Impl() 82 SfxViewFrame::SetModalMode(bool) 83 SfxFrameWindow_Impl::ModalHierarchyHdl() 86 SalFrame::NotifyModalHierarchy() 88 SalGtkFilePicker::execute() 92 ModelData_Impl::OutputFileDialog() 93 SfxStoringHelper::GUIStoreModel() Need to move authentication loop to the outer function, so that all the option guards in ProcessRequestImpl() are reset/set again, and also delay setting the option guards from the various callers so they can be reset in ProcessRequest() before authenticate(). Change-Id: Id697b1459f94f80fc58cee7768c2bd388369b29c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124452 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: implement CurlSession::abort()Michael Stahl
It looks like libcurl has an API to wake up a transfer in another thread, but have to use curl_multi_poll() instead of curl_multi_wait() to enable that. Change-Id: I728416eba45eb6665b0041955cdce8bee07e845e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124220 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: escape broken SharePoint 2016 URIsMichael Stahl
[ reimplement commit 069aa870aadb9f9069e8715c8be30394410f0288 ] Change-Id: I01a93e3a448e6dc921d1e0471ae01c8ac8feea11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124218 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#82744: fix WebDAV lock/unlock behaviour - part 4Michael Stahl
[ reimplement Sharepoint 2013 workaround from commit fed2984281a85a5a2f308841ec810f218c75f2ab ] Change-Id: Ib7f5a66e32d630e900f5f77c882ba791a9ab7aac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124217 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: use curl_multi API to support read timeoutMichael Stahl
This enables passing timeout to the curl_multi_wait() function. Change-Id: Ic0ab9afe955b3625be0a44304c69882eb896abf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124219 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: remove locks from LockStore after AUTH errorMichael Stahl
[ reimplement commit 94e4695bcfcb9356d37942c47359b94531ef7b95 ] Change-Id: I15d1a95074dcad3f2c642bb0819741a2b0f734c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124216 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: convert hrefs in PROPFIND response to URIMichael Stahl
curl_url_set(..., CURLUPART_URL, ...) doesn't work with relative URLs that are absolute paths. Change-Id: Ic67c99262fe5b399511f7a2e7b8592d7e065b2c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124451 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: implement dead properties in PROPFIND/PROPPATCHMichael Stahl
And delete a bunch of ghastly code. Change-Id: I1a01bfda5f86202d537f87b97d83cc5c0a65ed0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124079 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: clean up CurlUri m_Path messMichael Stahl
Fix the confused nonsense and add GetRelativeReference() for the cases where the path+query+fragment is needed. Change-Id: I663d20a686dcc787171ae7702d2a64451fa53807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124078 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: convert URI reference to URI as early as possibleMichael Stahl
Ensure that LockStore uses the full URL as key, not just the path. Change-Id: I84caf0d22e8c0ba176c19d004ee8ffcd2fdd05c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124077 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: handle "depth" in WebDAVResponseParserMichael Stahl
Also remove a spurious fall-through that probably doesn't matter in practice because the "status" element follows the "prop" element that contains "activelock" in the schema so at that time maStatus should always be empty for a valid response. Change-Id: If4cc8dbc75391d76ff497b83dd0f7fd00eb34a33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124076 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Don't crash when accessing WebDAV resource after auth failedMichael Stahl
[ replicate part of commit 162a472d55cf9fb9aaa6d5eae625b3da2273a516 ] Change-Id: Ia48b95d27cc9da8688104a05a758f82415a2d2dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123506 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:constfields in ucbMichael Stahl
[ replicate commit d8f8b4375998b62431c8605004e7c7d5c921ccc9 ] Change-Id: I720fdfbeab13e9dd210f11a613cb606e946d68e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123505 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#106955: Open WebDAV resources on which PROPFIND failsMike Kaganski
When PROPFIND fails on a WebDAV resource, its IsDocument property stays undefined, and so stream creation fails. Proposed solution is to default to IsDocument=true for all WebDAV documents where we cannot get the property from server. Such resources also fail to return their locking options, so defaulting to server properties. When later locking is attempted on it, the attempt fails with user notification (a dialog saying that getting information from server failed). Proposed solution is to check Content-Disposition header in such resources, and in case it's attachment, disable lock on this resource. The rationale for this is that "In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed ... as an attachment, that is downloaded and saved locally" (see MDN: https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Content-Disposition Also, Content::getProperties wasn't ready for PROPFIND returning empty result. [ port of commit fbc04c97231d629c1b5e9e57203dbe8d8eb06714 ] Change-Id: If0b4c10ef7b7b108a8779c773c65e25973d32b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123504 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: const-ness fixesStephan Bergmann
[ port of commit 95cfef300eb1a32d700479d2cefddc3fc4d0b37c ] Change-Id: Ic57525aa9a56c3d2f7f9cc5f0ca038bbfa8853a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123503 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (9): Fix eXo Platform WebDAV on 'Save Remote File'Giuseppe Castagno
[ port of commit 59d6d5579528a66e55b75987d2d959968db485a8 ] Change-Id: I32c2bb8c3985ce8d8cf8cd0aeae513815ed40b6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123502 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (8): Return empty property when not present.Giuseppe Castagno
[ port of commit bb27b2ff87e534b6f4fb9583271db29d6bbae8b6 ] Change-Id: I3375aff7e3b82bb41917b1d87432fd48af41a05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123501 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:unusedmethodsMichael Stahl
[ replicate commit 292560a957498bed70b625c992ec6bcf631dceb3 ] Change-Id: I17a719756423f57a847d5c2f6833ac4d7033f5f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123500 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (7): Caching connect timeout or cannot connect.Giuseppe Castagno
An unofficial HTTP response status code is defined and used internally in LibreOffice WebDAV ucp provider in order to catch either the DAVException::DAV_HTTP_TIMEOUT state or the DAVException::DAV_HTTP_CONNECT state. [ port of commit 97cc70d7285526ae2ee3b3bac425eb031c4c0321 ] Change-Id: Idd5d412dd10131199f34a047055d098a0f74cf7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123499 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (6): Cache OPTIONS if not present or if ↵Giuseppe Castagno
lifetime different Add the OPTIONS information and response status code into the cache: - if the OPTIONS information is already cached, update the cache only if the lifetime is different; - if the OPTIONS information is not cached, cache it. Add some new functions in DAVOptions to support the change and remove a function no longer used. [ port of commit 1ca68d386bc0345240bf288bec023faaba2e07af ] Change-Id: I9c06e06ba807eff393052dc706cb45b2dfcef105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123498 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (5): Deal with HTTP unofficial response status ↵Giuseppe Castagno
codes A reference can be found here: <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes> (retrieved 2016-09-13). Changes done: Add set of 'HEAD method not available' before using fall back GET method. Add new method in OPTIONS cache. Add response status code if fall-back GET didn't succeeded. Add copy-assignement operator to DAVOptions. Fix behaviour of GET fall back when HEAD missing. [ port of commit 16df731a30917a426df81d751a0bfd0ae5fcdd45 ] Change-Id: I4dbf4ead49f72617fad0a13f75b8e361d1a8dba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123497 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (3): Change caching model for HTTP response ↵Michael Stahl
status code Instead of caching only a single status flag, now both the HTTP response status code and the message accompanying it are cached. [ port of commit f423a9d695814b1babf5f2c3f42821190adc7e53 ] Change-Id: Ia77dc1d7575fc9d5517733687b8d3a1fdf9429dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123496 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (36): Fix behaviour of GET in fetching Headers onlyGiuseppe Castagno
Implement a better way to GET only headers, as HEAD method substitute. Wrote a new version of GET, specifically for 'no payload' service because sometimes neon was returning an internal error about: 'Compressed response was truncated' but without a specific error state. [ port of commit f7697a633cd56003fcb1d86bee7eb658020af506 - omit the actual change in NeonSession because it's not obvious if it is needed/was a neon-specific problem ] Change-Id: Ic6afe37d0e010745091301fd9647fc1b3b9e378d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123495 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (35): Add OPTIONS as pre-check in direct WebDAV ↵Giuseppe Castagno
open() method The function call will act as a precheck on Web resource access error when accessing the open directly without the normal file open procedure, e.g. accessing Web resource property values first. An example of this direct open call are the extension fetching and the extension update check. [ port of commit 909b6b84944e17141109272d917dcf4887483e5a ] Change-Id: Ic04903cfc1b056e150a080fc32428d43e3f842e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123494 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (34): Fix test and missing field value in ↵Giuseppe Castagno
comparision operator [ port of commit d751af3f84909996d44b9354ce9ed34891d374e1 ] Change-Id: I2b425741672e09eec3e42eb7af34cac9c20164eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123493 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (2): Refactor the WebDAV resource access retryMichael Stahl
[ port of commit ac060f97cc937787b4079e435c5b312f6894c277 ] Change-Id: Ib8cb79ddc67a486b067d3187a965ac55ae698fa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123492 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (1): Add WebDAV test to check HTTP reponse statusMichael Stahl
codes retry [ replicate commit e62c02a089e454eeea472e758e113e7e28568a02 ] Change-Id: Ie8bd0d0363ae3564f3287e928d36277ca48b17de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123491 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:unusedmethods in sc..vclMichael Stahl
[ replicate commit c4cd079b8f613084a99a83b95c3968b65cbd8900 ] Change-Id: Ifdd0c5823c02102fc84019912fbb9e8098ecc8db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123490 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:unusedfieldsMichael Stahl
[ replicate commit b18e1bc61ccba9d0c74274e2fe45b2b422c601cf ] Change-Id: I8458dce0ae9e71daebda708697501dd5ead5ae55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123489 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (32): Use a partial GET as a fall-back for HEAD...Giuseppe Castagno
... partial GET means a GET with no data returned, to test for resource 'real' availability in case HEAD fails or is disabled. At the same time disable use of HEAD method on the resource for the whole access procedure. This change is needed to manage web servers that don't permit the use of either HEAD or OPTIONS methods. To accomodate pure web sites that enable only GET to fetch contents. [ port of commit 2a148e2b5ea11fd371042e836fa95438ffa738e7 ] Change-Id: Ie0e2b6edd0860cbf704082500b91631543e7da38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123488 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: add additional comments from commit...Michael Stahl
... 827cc09948c09d934dd32ca1867252618f761eab - the code was already there. Change-Id: I90b0c617bf060adffd6912529b8fff7897069162 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123487 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (30): Better explanation of OPTIONS errors in ↵Giuseppe Castagno
debug build [ port of commit e137caed30052359783f2b112eee72553be1bd4f ] Change-Id: I758ce62c8e87407bab783c75fb8c9218dccc3f00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123486 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: WebDAV: Make some SAL_WARN log wording a bit betterGiuseppe Castagno
[ port of commit 4a70eac6045c4d3d5773ad0807dcde5a25391836 ] Change-Id: Ie0ec0bea4f1f482c2f80899c45c95ee6c0c70795 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123485 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (29) Fix for IIS 10.0 disabled OPTIONS methodGiuseppe Castagno
When OPTIONS methods (or verb) is disabled (or denied) on a IIS 10.0 web server, error 404 (e.g. 'Not Found') is emitted, so we need to deal with it. [ port of commit e0d0d87257d62ac61377a73909e17753f96e7aaa ] Change-Id: I67309f1bce20bba1399a9a3c22568291d095ac69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123484 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related: tdf#82677, remove cached element when appropriateGiuseppe Castagno
[ port of commit 90ded4cbf1ffbde2ef7926fb225759896ef075bf ] Change-Id: I7ffe75dc7a85088086f33b22eb1338ea22c1f363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123483 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related: tdf#82677, add cache use in Content::getProperties()Giuseppe Castagno
[ port of commit 00e1f840be4a1ff202d82377b3cbf233b352b1c3 ] Change-Id: I8c7f372404239276101fb7f64ba3415ef922e7e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123482 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related: tdf#82677, implement a PROPFIND 'propname' ↵Giuseppe Castagno
request cache PROPFIND 'propname' is the special usage to retrieve all the properties available on the URI resource, their names only. See <https://tools.ietf.org/html/rfc4918#section-9.1> for PROPFIND 'propname' definition. Add cache usage in Content::getProperties as well. The caching model is simple: a simple lifetime limit of 10 seconds to declare the property name list stale and request another list, accessing the Net. This should reduce the number of PROPFIND calls on the Net. [ port of commit 98bd24f8b479132ca3f2d884749b738e9e6203e3 ] Change-Id: I48ae38f706370557698dd80e31840b44e05bfef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123481 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (26): Fix possible early relase of cache mutexGiuseppe Castagno
[ port of commit 6431e91eca9e44684066a32ed3d6411509dac781 ] Change-Id: I90391c38bf9d0f4acf68ce29b2382ad855aa56ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123480 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (25): Make a std::less explicit, add/remove ↵Giuseppe Castagno
TODOs... ... and a bit of function member signature change. [ port of commit 5300b55a1dbcbea6ea244e66e3bc91a0218db5c9 ] Change-Id: Ia9d8f78c2fb39bd0943d4c2fb7d9b11cbee1034a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123479 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (24): Simplify cache removal: DESTROY, ↵Giuseppe Castagno
PROPPATCH, MOVE Plus another PUT forgotten on a previuos commit. [ port of commit 1ed01e1bcc929d363ad5f3c4d2cf262a20134412 plus move Uris back into try block ] Change-Id: Ieda94cc855f8a6b648dda404dfad411795c3dc33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123478 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (23): Simplify cache removal: MOVE, COPYGiuseppe Castagno
[ port of commit 63af1c52c534840d1f55e3041351d24b85edcaa4 plus move Uris back into try block ] Change-Id: I8cc7f6e14fcac294531b5be8fdbaf78610a3adfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123477 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related: tdf#99499, add a limit to the number of http ↵Giuseppe Castagno
redirections Check for maximum number of redirections according to <https://tools.ietf.org/html/rfc7231#section-6.4>. A practical limit can be 5, due to old RFC: <https://tools.ietf.org/html/rfc2068#section-10.3>, this limit is reported also in more recent RFCs, see final paragraph of RFC7231, 6.4. [ port of commit 18009fe8fbe3982141ddca3f1fcd0900a63150a6 ] Change-Id: I3a6d1510627434cdff9e4f0af8194a8e6a33c28b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123476 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (22): Simplify cache removal: MKCOL, PUTGiuseppe Castagno
[ port of commit 8ff5e67dea29d9ceb100a67a69f6deb4c6f18e13 ] Change-Id: If24272566bfb5fba32b9df9bd0f8e1c7fe18c585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123475 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (21): Simplify cache removal: LOCK, UNLOCKGiuseppe Castagno
[ port of commit 508f78298833f45fd9e2e789aa26cca125719baf ] Change-Id: I81185c11ed3ad216b13fcbafee45ea3a48cf0a12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123474 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (20) OPTIONS: Check for Class1 DAV before unlockGiuseppe Castagno
[ port of commit d14977d33bc3edb6a2c41db4d685d099bfe8d51e ] Change-Id: I559d71f49e582af50ef88ea42beba48d38180134 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123473 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related: tdf#96410 eXo Platform WebDAV: where lock fails...Giuseppe Castagno
...because apparently eXo Platform WebDAV does not support or supports poorly this section <http://tools.ietf.org/html/rfc4918#section-7.3> of RFC4918. It returns HTTP error 404 instead. [ port of commit 4475c191de479e7a5ddb20d14bc3aa32b0ab84d3 ] Change-Id: I58c91330806abbde5968ed22e98b9ff80c98c505 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123472 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (19) OPTIONS: Add mechanism to manage not found ↵Giuseppe Castagno
Web URL: GET [ port of commit 7f32fddb445ef1c1e17f9028f252c21dd83e03af ] Change-Id: Ie1412f849df0b9da76ccc41309e8e587c8f36c7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123471 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (18) OPTIONS: Update OPTIONS cache lifetime if ↵Giuseppe Castagno
not found [ ported from commit a5fc27e0575eab115de3714ae07fcac7481f4daf ] Change-Id: I61d06051a4526676fc4ab80d653ab7c2a9e4c209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123470 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (17) OPTIONS: Options cache removal: COPYGiuseppe Castagno
[ port of commit bedae6b06c51c641c38fa7dd3e25dd2aaafb30cf ] Change-Id: I1618a7a5ec4e52fdd9e99b17b2b36e5ef77decae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123469 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>