summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-01tdf#145496 Add dropped nLineWidth from refactoringJan-Marek Glogowski
Regression from commit 4fc1b3fb659be916167518b49ffe8193e9033f30 ("flatten ImplGetTextLines"). Change-Id: Ib9f086243b4e3ae245263492e714de6f81b89ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124557 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
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>
2021-11-01ucb: webdav-curl: tdf#101094 (16) OPTIONS: Options cache removal: MOVEGiuseppe Castagno
[ port of commit 2359e5a002f4df58548803320991064e6a6d968c ] Change-Id: I27a68855198fe220a1f4141bb89673992c12e1f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123468 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (15) OPTIONS: Options cache removal: MKCOLGiuseppe Castagno
[ port of commit 1596379bc00a32bc3b4e76a53aa884112b21764b ] Change-Id: If217fde550ef55375e4743de00dcb325a89674c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123467 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (14) OPTIONS: Options cache removal: PUTGiuseppe Castagno
[ port of commit e0eb85785b68867f1476553723dbfc6dc407106b ] Change-Id: I2c4109b44ba291fdc01289b2706f746512d7e3e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123466 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: CurlSession OPTIONS() lock cacheMichael Stahl
Change-Id: I3a815e70db04439dc33d57ce9e214d52a7f0e08d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123465 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (13) OPTIONS: Options cache removal: LOCK, UNLOCKGiuseppe Castagno
[ port of commit dfb714183f31d8a235797ef1ad3c517966ed4985 ] Change-Id: I1cf4689847f4f033d6f8cc40265b98b9614363e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123464 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (12) OPTIONS: Add options cache ctrl in ↵Giuseppe Castagno
getResourceOptions [ port of commit 37ada6f457e19b6ee2d2adb0b0ab3acb20705b51 ] Change-Id: I3cfd71c0c90b828de7d953d5ff3f0e445b3f156f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123463 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (11): Add WebDAV options cache configuration param.Giuseppe Castagno
Added in officecfg five new properties to be able to set cache lifetime if needed. The new properties are available in advanced, expert configuration only, in org.openoffice.Inet.Settings. Default values are as follows (value is in seconds): OptsCacheLifeImplWeb = 300 when the web resource is Web only, implementing OPTIONS. Min. 0 sec (no caching) max. 3600 sec (1h). OptsCacheLifeDAV = 60 when the web resource is WebDAV. Min. 0 sec (no caching) max. 3600 sec (1h). OptsCacheLifeDAVLocked = 600 when the web resource is WebDAV and it's locked by this LO instance (e.g. lock store has a lock to it). Min. 0 sec (no caching) max. 3600 sec (1h). OptsCacheLifeNotImpl = 3600 when the web resource does not implement OPTIONS method. Min. 0 sec (no caching) max. 43200 sec (12h). OptsCacheLifeNotFound = 15 when the requested web resource is not found on server. Min. 0 sec (no caching) max. 30 sec. [ port of commit 2c0b4ff238f39b5fcce09c7d36e80ac1e7cb713e ] Change-Id: I5a4c44449c91b7d3a8840bfaf8326e35f86415dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123462 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (10) OPTIONS: Add a simple options cache classGiuseppe Castagno
Added behavioral unit tests as well. [ port of commit b641d83bb9f8adba1a487ca0e04d7151f96c3eea ] Change-Id: Ie8867aeb45dcc8d343b156608e8a30970f76f6f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123292 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (9) OPTIONS: Add options check in ↵Giuseppe Castagno
Content::getProperties [ port of commit be47f60b51c053c6329637e829ce16e2e90610fe ] Change-Id: I8fd0dbc1f9847e799c244821bfe4e628c39c2017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123291 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (8) OPTIONS: Add options check in ↵Michael Stahl
Content::resourceTypeForLocks [ port of commit 6ab2cabeae02b6beb3c33238773ba075f41c4bb9 ] Change-Id: I10f928fb5484738553769f54353ca7637e0780ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123290 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (7) OPTIONS: Remove resourceTypeForLocks before ↵Giuseppe Castagno
unlock Not needed, unlock() checks if a lock is present first. If present, it means that LOCK is available, inferring the presence of UNLOCK availability. [ port of commit fd586445a47d50ebfff67a7d5e4a329cf064cb92 ] Change-Id: I639c558c6e6f322f37d267bbc31309504745e02c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123289 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (6) OPTIONS: Do not retry on HTTP error 501Giuseppe Castagno
HTTP error 501 the server tells us the used method is not implemented, non need to retry. [ port of commit 6dcd231892d80d2f130d1b9ebb9cf7dfa1115df1 ] Change-Id: I5325f6527c7bb5c8f87d4301fd13eb6c71a318f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123288 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (5) OPTIONS: Add options check in ↵Giuseppe Castagno
Content::getResourceType Added some verbose SAL_INFO to detail server responses to PROPFIND. Corrected a wrong comment and beautified a bit code I introduced in commit 3b26a2a403ca5e99b0dd07d042d47501c091af16. [ port of commit 211cb2dec3501a9ea224512ebedbc7cd1c46cd45 ] Change-Id: I7917408dcc09e42cb23d29b28e02904594023dd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123287 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: indent that temporarilyMichael Stahl
Change-Id: I8cd3373b64c29d1f76c19a8f229cda0060cc79cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123286 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (4) OPTIONS: Add member function getResourceOptionsGiuseppe Castagno
[ port of commit 2777b6380c17bad8a966454947b9d991f9592224 ] Change-Id: I8c54b564a8c92dcd395e104976f7a7071b5264eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123285 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: implement DAVResourceAccess::OPTIONS()Michael Stahl
This is just a copy of DAVResourceAccess::PROPFIND() and trivially adapting 4 lines to call DAVSession::OPTIONS() with required arguments. Change-Id: If2ac8e4a465d0f09b7cf02647ac4c8e4860c45b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123284 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: implement OPTIONS()Michael Stahl
Change-Id: I601a161c3e6c4b7e741a79bfd15510bb40b5d81c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123283 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#101094 (1) OPTIONS: New class to store retrieved OPTIONSGiuseppe Castagno
This class describes the DAV options useful to LO. Added behavioural unit tests as well. [ port of commit f950b49393ee6539f2a7b3c306aa4fc119f24a84 ] Change-Id: Idfcd66229a2bbbdf4452da731a5b921527447358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123282 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:unusedfields in ucb/Michael Stahl
[ replicate commit 00bb8141beee7088625992a046e94c6f8da8da83 ] Change-Id: I8144eca6b27fda799a8e875b568a3bcf6b974d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123281 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: In case of Web site access, add Content-Type to HEAD request.Giuseppe Castagno
This remove a necessity for another HEAD request when MediaType is requested while accessing a Web site, a cleaner implementation of d61352f58a7f750d3b0b0a9c2d6498fbb7a6e10d. This behavior is active only on a standard Web site, when PROPFIND failed earlier on the program flow, without retrieving the property DAV:getcontenttype. [ port of commit 9325c18044a8adc852e2d1b42a5a479ab6195da8 ] Change-Id: Iebdae815d096be8ef45b969d7c4d84acc26694b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123280 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:unuseddefaultparam in ucbNoel Grandin
[ port of commit 83911dd753fbfd0328bae2dfa37d19f514d4b2f9 ] Change-Id: I5a57b7af9cd231e89fc93cc1a5f277cae23a1427 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123279 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related tdf#95217: Force HEAD method in Web access if ↵Giuseppe Castagno
PROPFIND failed [ port of commit d61352f58a7f750d3b0b0a9c2d6498fbb7a6e10d ] Change-Id: Id945be7a1f71c830f3ab15c54fbf65a32be71a2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123278 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related tdf#95217: Http header names are case insensitiveGiuseppe Castagno
[ port of commit e973b342826e54f147251b132c3325d30749e312 ] Change-Id: I7473625894c023c526a8ffeccd7ec6d67629ff76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123277 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Related tdf#90700 Add configuration for web connection ↵Giuseppe Castagno
timeout. Currently the connection timeout is governed by operating system default. LO timeouts will be used in place of the TCP socket operating system ones, only in operating system where this is currently possible. The timeouts to use can be changed in LO configuration: 'Tools > Options > Advanced > Expert Configuration'. Propriety names are ConnectTimeout and ReadTimeout. ConnectTimeout contains the timeout (in seconds) used when making a connection (max 180 s, min 2 s, default 20 s). ReadTimeout contains the timeout (in seconds) used when reading from a socket (max 180 s, min 20 s, default 60 s). [ port of commit 14220052ef2b8675ee12aad63b0402f023d9760a omitting Session change which isn't directly possible ] Change-Id: I276851958f587346a36ee5f173b3e4fb88a944b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123276 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#95792: fix saving file the first time on some WebDAV ↵Giuseppe Castagno
servers. Some WebDAV servers don't implement section 7.3 of RFC4918: <http://tools.ietf.org/html/rfc4918#section-7.3> This lack of implementation breaks 'Save As...' functionality when the target is a WebDAV server, by not locking the URL ('reserve the name for use', in RFC4918 parlance). The server not implementing this usually answers with one of '405 Method Not Allowed', '501 Not Implemented' or '412 Precondition Failed' http error codes. The fix should manage this lack of implementation. [ port of commit 4c82edfb3a9286a0bfef3f006e468e5c331987eb ] Change-Id: I343368bb91bdffff143aa26d8449b48f3b5300d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123275 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Fix tdf#90700 Notify connect timeout early.Giuseppe Castagno
Throws exception to manage timeout early in the first connection sequence. [ port of commit 95958755cbbf8c6026b878703400d5d9ec1e6c98 ] Change-Id: Ib6d306100ab04a3a21c37108d5c88185acf2524a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123274 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Add/change some logs in WebDAV ucb.ucp layer.Michael Stahl
[ replicate commit dd9c15b36f69bec4d4fc9b0049f7e496e5eb9e9d ] Change-Id: I9eb87ea7216c83ce1ac63f65dd96ebe6760a50a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123273 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#83531 Opening WebDAV URL WebDav fails if write is ↵Giuseppe Castagno
restricted Happened because LOCK method was not allowed without credentials. [ port of commit 0326352470aee1a774bb5aa314c4f3625c1372b3 ] Change-Id: Id94b96856737e50715c2a18427ba22c3776a8da9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123272 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 3Giuseppe Castagno
Changes done to the code in sfx2, ucbhelper, ucb, unotools in no particular order - add method helpers to call the ucb lock/unlock - add lock/unlock 'real' management - make DateChange property retrieval working for WebDAV as well - add check for changed content of a WebDAV file, in order to reload it correctly when 'Edit Mode' command is activated from GUI - Unlock WebDAV file while saving only if explicitly enabled Needed in order to avoid the small window of file unlocked state that opens while saving a file. When saving LO actually does as follows: - unlock the prevoius version of the file - prepares operations to save the modified version - lock the new file - save the new version - the lock method is enabled if the DAV resource supports it. In case the lock is not supported, for example example DAV with lock disabled, the lock method is disabled. Exception: when the resource is first created and the lock is not supported: a lock command is sent anyway, because if the resource is not yet present, there is no method to detect the lock/unlock availability in this case. - cppcheck:noExplicitConstructor [ port of commit b4576f3da4d90139fc5140962d13cb91dab98797 excluding the obsolete FTP scheme thing ] Change-Id: I16bb4e2fa9899fd31af7c223390f3fb213330fa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123228 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Remove redundant comparisons, copy properties unconditionallyMichael Stahl
[ replicate commit 39bbfa61653ba7c3cca0aed739559914c78edc89 ] Change-Id: I28730c1fc7f6808bf9657855cf1d65369b695c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123227 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 1Giuseppe Castagno
There are some areas in ucb outside the issue scope that should later be addressed, among them: - in ucb/webdav make flag m_bTransient working right, currently lock option for WebDAV server not supporting it is suboptimal: there are not needed lock requests; - change the method the modified file is checked against the old one, using DAV:etag instead of the DateTime; - some http status code returned by the server don't seem to be managed; - during WebDAV operation some redundant request of properties is carried out. Probably some clean up to remove these not needed transactions is to be done. Accessing only those really supported by the referenced href would be better. Changes done to the code in ucb, in no particular order - remove current WebDAV lock management - have the lock/unlock working correctly when the webdav resource is first created: in the case of creation is the first lock on the non existent resource that actually creates it - fix a problem while fetching WebDAV properties. If a single WebDAV non-cached property was requested, it would not be fetched from the server without this fix. - change the lock owner name. This should probably be different. Something to be discussed. This same string can be read by all the applications accessing the lock. Spec reference is: RFC4918 [2007]: '14.17. owner XML Element' link (as of 20150713): http://tools.ietf.org/html/rfc4918#section-14.17 - manage WebDAV locked file exception directly while locking. The ucb::InteractiveLockingLockedException is thrown directly when detected by the lock command, to avoid the user interaction activated by the cancelCommandExecution method. - terminate gracefully if WebDAV lock/unlock is not supported [ port of commit 26e6d4b05ab444e6a7529ffcac7fbe592fc94833 ] Change-Id: I0a4c926dc1e32cc620ad6e9acfc9c9c56928fa49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123226 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: remove unused LOCK() overloadMichael Stahl
Removed from neon in commit 9d7727737b067c5228f129737046f718d5965659 Change-Id: I1df14d8e05e50a6a0ce7af4f6079f11be6628903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123225 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: NeonLockStore::stopTicker(): really avoid deadlockMichael Stahl
Follow up on 68ba2785c55eaa1ea70ce135bdad5322b0e04ed7, which missed the sad fact that m_aMutex is locked recursively. Avoid that by passing a ClearableMutexGuard to stopTicker() and unlocking that. Also lock m_aMutex in the destructor while at it. [ port of commit 13b60fd80a7adfb0ef81a818917cfec5edfc6edc ] Change-Id: I65bb4ec98f13d28089c3b2eb3300074944024188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123181 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: NeonLockStore::stopTicker(): avoid deadlockMichael Stahl
Tor reports that NeonLockStore::stopTicker() m_pTickerThread->join() can deadlock with TickerThread running NeonLockStore::refreshLocks(). This can be avoided by copying m_pTickerThread to the stack, and releasing the m_aMutex before calling join(). [ port of commit 68ba2785c55eaa1ea70ce135bdad5322b0e04ed7 ] Change-Id: I6d2d993fd5315f27e6559a1e9034e961303fe894 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123180 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: adjust some trivialities to match...Michael Stahl
... commit 0c3500115c4fd86284a027fc32be704afcf77061 - turned out there wasn't a substantive difference to the existing code after all, except for the FTP URL scheme check, which i don't miss. Change-Id: Ie24988a4117445cf729515958dea88d17627859a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123179 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: use std::unqiue_ptr in ResultListMichael Stahl
This reimplements commit 7ff650a6fe405c98d182c6cabbb46217b56bb0c6 and commit fc90cf2af58dc8d551c39ba37d3a44597aa11e44. Change-Id: I517ce2a4eeda75c25b7a7f7debee8904b454a144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123178 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: fix exception in Content::queryInterface()Michael Stahl
This was refactored in webdav-neon by commit c2ca6fabd1afc3fc07001721c2069d3c8db7000a but it turns out that here the m_xSMgr doesn't exist anyway since commit 317b5bdadebc5560d38da4c9dd6d68c64a93b9a8 so just use m_xContext. Change-Id: I5c190d6e562ddd095fd6f8c8400ee4a7b7d5a5a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123177 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: add documentation from "rhbz#678440: Always ...Michael Stahl
... include User-Agent to avoid 403 from picky servers", commit 4d0e3127ed2def7212bc05aa860cd06704bb1efe. Change-Id: Ie20def64b7fd1a4f523db84f42d83037bbf88856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123176 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Adapted TickerThread to safer-to-use salhelper::ThreadStephan Bergmann
[ port of commit f7afe3b7b07800d130b4d9102f2a94ccac0ebc52 and c58882fda80b63baac3360001b0fdf251d96e0eb "fix msvc2005 build" ] Change-Id: I7173a99aaebd01535971d25350d00923c6607c5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123175 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: add OpenCommandArg3 "KeepAlive" supportMichael Stahl
This is based on the following commits, which conflict everywhere, except the code in CurlSession.* is new. commit 09954fc863c8ee900f157cab4458e1dcf51493d3 Author: Thorsten Behrens <tbehrens@suse.com> AuthorDate: Tue Jan 17 04:59:56 2012 +0100 Fix UpdateCheck clog up server by keeping connection alive The update check protocol uses the webdav ucp, which uses neon, which in turn defaults to keeping the connection alive. this is nice for webdav, but disastrous for millions of clients phoning home to the same server. Using neon directly in updatefeed.cxx is not an option, due to the thread safety problems around that (see e.g. rhbz#544619) - so we had to extend it to accept connection options, and reuse the existing webdav provider. commit 29bd62fdc2792e215999e9dd0ec9a4bf1102201d Author: Thorsten Behrens <tbehrens@suse.com> AuthorDate: Tue Jan 17 11:41:14 2012 +0100 Switch flag sequence of OpenCommandArg3 to NamedValue. Based on feedback for 09954fc863c8ee900f157cab4458e1dcf51493d3, using the less-bulky NamedValue type instead of PropertyValue. Change-Id: I48e07dd4c3f189eb4445ed95a67011131d7b49f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123174 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: callcatcher: remove unused methodsMichael Stahl
[ replicate commit af6752b88e34df05449a4237d9be0fac509c227c ] Change-Id: I608798e95297642fe768d7ad66d524f084fa83d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123172 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: catch exception by constant referenceMichael Stahl
[ replicate commit e4ce7225dd987f9b2f250f055d9688de79931444 ] Change-Id: I9727af7b85a7f4c0a821a41856d72644b306ba29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123173 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: fix init of SimpleAuthenticationRequestMichael Stahl
The parameter was removed in c158c00489d35af7f5f9278b8ee545678d6a42e5 so "true" was erroneously passed as bCanUseSystemCredentials. Change-Id: I98d3b554a787c7200337735d5fde13b7db43a832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123121 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>