summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)Author
2021-11-18ucb: webdav-curl: don't assert on valid URLMichael Stahl
If you put an URL into the host field of the remote files dialog, it will gladly create silly urls that start with "https://https://" - these are syntactically valid because ":" may occur without port number path segment may be empty, so don't assert. Change-Id: I29b6317daeb76d8f2fd4a22c0908ad2366c36297 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125484 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-15fix typo in commentStephan Bergmann
Change-Id: I267390e6d7251ec59c6374ca904ccba16f2a94bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125253 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2021-11-12Fix (mis-)uses of temporary O[U]StringLiteralStephan Bergmann
...as sub-expressions of ternary operators, which happened to keep compiling after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" and e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString" because both branches are of the same type O[U]StringLiteral<N>, and which didn't cause any issues because no dangling pointers to those temporary objects escaped the surrounding full expressions. This was found with an experimental build with VS 2022 with --enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some linking fix in the configure.ac detection code (which is forthcoming in a later commit) and flagged all these uses in ternary operators as error C7595 "call to immediate function is not a constant expression". That error looks bogus (and it also caused a false > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that compiler bug is fixed), but it nicely found all these cases that should arguably be cleaned up. Change-Id: I81de94e8af5a6c50e5fe7dfa1a4b253e0c2a68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10Fix typoAndrea Gelmini
Change-Id: I1ab712c8bea7083e0f32c647d783d12a770322a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124941 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-09The CurlOption curl_off_t case appears to be unusedStephan Bergmann
...at least for my clang-cl Windows x86-64 build (see comments at <https://gerrit.libreoffice.org/c/core/+/124452/5#message-10cc4dfb88a258e59f09c5fbf413052aa9ddd49c> "ucb: webdav-curl: rewrite authentication loop for reentrancy") Change-Id: I4f6b255c6a9acb26844b7ef5c11f0f1fcf06b3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124907 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-09Address of dllimport function isn't considered constant expression by clang-clStephan Bergmann
...causing the (mis-)use of std::integral_constant to fail with > In file included from ucb/source/ucp/webdav-curl/CurlUri.cxx:20: > In file included from ucb/source/ucp/webdav-curl/CurlUri.hxx:24: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\memory:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\exception:12: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\type_traits:12: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xstddef:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\cstddef:13: > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xtr1common(22,26): error: constexpr variable 'value' must be initialized by a constant expression > static constexpr _Ty value = _Val; > ^ ~~~~ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xtr1common(28,16): note: in instantiation of static data member 'std::integral_constant<void (*)(void *), &curl_free>::value' requested here > return value; > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\memory(3195,13): note: in instantiation of member function 'std::integral_constant<void (*)(void *), &curl_free>::operator void (*)(void *)' requested here > _Mypair._Get_first()(_Mypair._Myval2); > ^ > ucb/source/ucp/webdav-curl/CurlUri.cxx(49,25): note: in instantiation of member function 'std::unique_ptr<char, std::integral_constant<void (*)(void *), &curl_free>>::~unique_ptr' requested here > CurlUniquePtr<char> pPart2(pPart); > ^ etc. as the involved functions like curl_free are defined as CURL_EXTERN void curl_free(void *p); in workdir/UnpackedTarball/curl/include/curl/curl.h, where CURL_EXTERN expands to __declspec(dllimport) Change-Id: Ib278cd9e97260b588144d81dba344ccbb5309608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124899 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-08Fix typosAndrea Gelmini
Change-Id: I945c72ce9065d0c59e7ebcb96c70995d5333b67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124841 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Typo: implemnented->implementedJulien Nabet
Change-Id: I3171c95523408b69587aaa2bb064c750bc56c55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124809 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05webdav-curl: there's no non-const Sequence::operator[]Mike Kaganski
... since commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 Change-Id: Ib56e854206074dd247dcd0f876a8a92b3f9af7ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124763 Tested-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03Silence loplugin:toolslong in ucb/source/ucp/webdav-curl/CurlSession.cxxStephan Bergmann
...similarly to how it was already done for its ucb/source/ucp/webdav-neon/NeonSession.cxx cousin Change-Id: I78124f45d4cb08131ee5d6e8c2606b38407c0668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124637 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-03ucb: webdav-curl: consolidate unit testsMichael Stahl
1 CppuniTest makefile should be sufficient, particularly since all 4 of them used gb_CppunitTest_use_library_objects so this should reduce wasted space. Change-Id: I485f0af0aee2b265b56c505ced44257834784e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124608 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03ucb: webdav-curl: convert webdav unit tests to curlMichael Stahl
There's no point in building the tests for neon any more, just build them only if curl is used. This finds a bug in CurlUri::Init() where query and fragment separators need to be added manually. Change-Id: I3dcd1512450522df2c2a7d223b2e29b6c0e794fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124607 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03Fix typosAndrea Gelmini
Change-Id: If203853359b1c30c6cb6feea6c1ff718bcaa0188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124622 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-01ucb: webdav-curl: remove SerfLockStore::getLockToken()Michael Stahl
Looking rather obsolete, plus NonInteractive_LOCK() can just get the token as a parameter since it's called only by LockStore. Change-Id: I4c5c84135592fbab20f36c93d0c99b80fccb0976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124453 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
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>