Age | Commit message (Collapse) | Author | Files | Lines |
|
This reverts commit d95ac1c608caba9cabaa503f1a5589285547aed5.
Change-Id: I4bc104272d4c41efab1a7e5eae78267675c1b32b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167753
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167805
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Otherwise there will be timeout that depends on when the server will
close the connection, which varies by server but can be several minutes;
getting a potential error document from the server for this one request
when logging is enabled is less important.
Change-Id: I505b014b148ba009c400d37d826c9edb8c3a6da2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164838
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit c8400f5acc36d2cf0c007260bdc94534a53bba90)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164822
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Some testing with Apache httpd+mod_dav reveals that it usually sends a
body with a 401 status, which causes the CURLE_WEIRD_SERVER_REPLY error
code from curl.
So we should either ignore this error in case there's a HTTP status too,
or stop using CURLOPT_NOBODY.
The latter seems to have no downside, except for HEAD requests, where
strangely the server keeps the connection open and curl waits for 5
seconds for no body to arrive, blocking the UI, so continue to use
CURLOPT_NOBODY for HEAD.
The other methods don't seem to block.
It turns out that the SAL_LOG-dependent setting of g_NoBody turned HEAD
into GET anyway if logging is enabled, so explicitly set the method.
Change-Id: Ibe2eef8e7a827d4e356ba37c4b56bee0be3b9c13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164569
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit e0259d4c0951c4dd77c74d08b9d905728d4c8dfd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164507
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
The problem is that if the server does send a body, then curl returns
CURLE_WEIRD_SERVER_REPLY error code, which is translated to
DAVException; this looks unnecessary now because write_callback
will just return if there's no stream to write to anyway.
Change-Id: Iddaee9778ac7bbd538b64584f822f65ab0e395c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164550
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 980ca3953084560806cd980d2ec16951d9e30c2b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164501
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
and
cid#1546459 COPY_INSTEAD_OF_MOVE
cid#1546452 COPY_INSTEAD_OF_MOVE
cid#1546403 COPY_INSTEAD_OF_MOVE
cid#1546396 COPY_INSTEAD_OF_MOVE
cid#1546394 COPY_INSTEAD_OF_MOVE
cid#1546338 COPY_INSTEAD_OF_MOVE
cid#1546324 COPY_INSTEAD_OF_MOVE
Change-Id: If61457cfaf1d7ce4a069bcecdc0cc657aeb43c68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160445
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ifd6c15630991c922f9392940142bb16c5e83685c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160286
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I9ea3cad738f5cbef0036fde9112b391893aff615
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160277
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: If6f818506ef7a596a6ea3af4185859b09c6d4d75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160096
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: Ie2c790420ce5fe2e2804f33ff552c2252dc0cc0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160014
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I9ce4ae0246f78acd7bfed89f52103c2f5e571c14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159706
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I85f83c3d83f3de59a929ed053e0e92bb10bdcc5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159498
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: I0a46dc226e141eb585817fff4871f8d1681a3f3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Places that didn't initialize it previously, would benefit automatically
Change-Id: I2f1ff25fc58d9378462072bc92d7b37be2370fc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159299
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
FTP support has been deprecated since LO 7.4.
The UCP currently doesn't even support TLS connections.
Also disable FTP protocol in libcurl.
Also remove JunitTest_ucb_complex: turns out the only test in it,
checkWrongFtpConnection, fails on Linux because now GIO UCP handles
ftp:// URLs and it throws InteractiveAugmentedIOException instead of
expected ones, and on other platforms it would fail differently because
there is no GIO.
Change-Id: I4631d124371fef390f105fb16bf09aaa59e739e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159065
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
By default, unencrypted network connections are allowed.
But now it can be disabled, for everything that uses libcurl.
Change-Id: I8e103f5a968ace2a19fdb9d6934c9a51b2aeabe4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159011
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
The problem is that curl 8.3.0 removed the NSS backend, so we now
have no other choice than to use the bundled OpenSSL on Linux.
Currently any curl https connection fails with:
CurlSession.cxx:963: curl_easy_perform failed: (60) SSL certificate problem: unable to get local issuer certificate
Apparently this requires manually telling curl which CA certificates to
trust; there is a configure flag --with-ca-bundle but that is useless as
it tries to load the file relative to whatever is the current working
directory, and also did i mention that there are at least 3 different
locations where a Linux system may store its system trusted CA
certificates because ALL ABOUT CHOICE.
So add a new header with an init function to try out various file
locations listed in this nice blog article and call it from way too many
places that independently use curl.
https://www.happyassassin.net/posts/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
TODO: perhaps bundle a cacert.pem as a fallback in case the system chose
to innovate by putting its certificates in yet another unexpected place
(regression from commit c2930ebff82c4f7ffe8377ab82627131f8544226)
Change-Id: Ibf1cc0069bc2ae011ecead9a4c2b455e94b01241
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158915
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
to avoid needing to query other, rather expensive properties
Change-Id: I34ebc7a03e468f0a7fa9964954e5690ad336016a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...in include files. This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.
Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ic3123585203ebcdf2fe791709d38551e7a326d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158246
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Avoids overwriting source location in message
Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ia22d2efca14b1f55f45a4ecb9c487591c3117e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157704
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I1749628e0104dff856161bc0bdfd343ef0db208e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156784
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
Change-Id: Ibcc7f37e464cde44cfbb6fbd70c3dc66667102bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156553
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
|
|
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which warns against using the 'operator bool' conversion of
std::optional<bool> which can lead to interesting bugs
The bugs that this plugin have been submitted independantly,
so this change is just using has_value() in relevant places.
Change-Id: I259b837feeecddcb8cd1d7e5db1e85bf505907cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155978
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
It turns out that every single client of InternetProxyDecider simply
concatenates the 2 members of InternetProxyServer into a single string
and passes it on to curl_easy_setopt(CURLOPT_PROXY), which will happily
take a URL including scheme and everything.
It turns out that the awful GetUnixSystemProxy() tries to cut off the
scheme in a terrible way, but GetPACProxy() does no such thing and
WINHTTP_PROXY_INFO::lpszProxy may or may not contain scheme in its
entries; fix this to only separate the port and leave the rest alone.
So why do we need a InternetProxyServer struct? Because officecfg has
separate entries that correspond to its members, and so
InternetProxyDecider gets separate events on its listener interface when
any of them changes, which is easiest to handle if it stores these
separately.
So just return a concatenated URL with or without scheme in getProxy().
Change-Id: I43c696471c8bec90667b5930fa00975adb432fe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155840
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
If rSession.m_Proxy.aName is a simple host-name, the CurlUri constructor
will fail with CURLUE_BAD_SCHEME, so just ignore the error here,
we only care about parsing out the username/password
Change-Id: Iec2d6e7315a5899ddddf6120a43199b75bf62db2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155834
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...for which CppunitTest_ucb_webdav_core would fail with
> ucb/qa/cppunit/webdav/webdav_local_neon.cxx:60:(anonymous namespace)::webdav_local_test::WebdavUriTest
> equality assertion failed
> - Expected: ?query#fragment
> - Actual : /?query#fragment
and
> ucb/qa/cppunit/webdav/webdav_local_neon.cxx:89:(anonymous namespace)::webdav_local_test::WebdavUriTest2
> equality assertion failed
> - Expected: ?query
> - Actual : /?query
because of
<https://github.com/bch/curl/commit/5752e71080cb3aafa8b24c3261419345b832bc92>
"urlapi: have *set(PATH) prepend a slash if one is missing".
All that test code had been added with b03e070420606d407df2ec5e9dfa7043ecc46177
"ucb: webdav-curl: fix CurlUri::CloneWithRelativeRefPathAbsolute()", and it
looks harmless for our use cases that cURL started to behave differently there
now. So instead of accepting either of the outcomes depending on what cURL
version is being used, just change the test code to not leave out the
path-absolute in the calls to CloneWithRelativeRefPathAbsolute (which is
documented in ucb/source/ucp/webdav-curl/CurlUri.hxx to take
> /// @param matches: relative-ref = path-absolute [ "?" query ] [ "#" fragment ]
and path-absolute cannot be empty as per RFC 3986 "Uniform Resource Identifier
(URI): Generic Syntax").
Change-Id: If07a28598dfa047ebe89d8bcda19e8fcaa36aed0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155099
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id94a89596bd473ed8c83d7be89ba673d8dc1bba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150878
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Iad2564853a2a0d74cd526b1574e421e121fd6986
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153644
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
that can be initialised at compile-time instead of runtime
Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.
This seems to make a different at least on Visual Studio
Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I45bbd342734f190ce918b610441ca911a47830b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153062
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Even if it used to be valid before; unfortunately newly entered
credentials weren't actually used because the flag was never reset.
Change-Id: Ib36689f40ff780596b9cfe6fe589a6f2e79cfcd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152679
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
found with a lightly tweaked version of the loplugin:stringadd
and some hand-holding.
Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
With d6182cb6704c06f33d284874b9fe96c85cce5bf5 there are cases when a
webdav server inadvertendly releases the lock. Lets apply the fix only
if the Class1 flag is actually set.
Change-Id: I85e5253c7df0980f373d2dea788c331b81ed4a82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150552
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
|
|
suggested by mike kaganski
Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
improve the check by checking for methods that exclude
using string_view, rather than checking for methods that
__can__ use string_view, which leads to exposing
some holes in our o3tl/string_view.hxx coverage.
Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which prevents constructing unnecessary temporaries via getStr()
Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which makes it easier to pass around string_view in a few places.
Change-Id: Icbbb7f56494986582f1c3272404775bd98031240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5a2c37e4ff1e19cfbc29e1e61b025f44d067b95a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
when applying my upcoming patch to also consider O[U]StringBuffer
Change-Id: I2445a69dc46314c73f54c190a0c498c0309be06b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149750
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I196e4539ad430a39415eff9d7170b33df7228230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149062
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to find more locking we can remove
Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I842114880c43dfcc342b6255b7d17befb905bccb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148345
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I70b20a616cb84c5c066431be50359def5d041b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147188
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I21b98831645e2d7942bdf630225c136f9af3dca3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1ab5183cff5eaed9e3c0821115c7f89850d3b482
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147160
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I75cbf133e2e632c41759515fdf8894faed599c8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147159
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|