diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-03-07 20:10:48 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-03-08 10:24:34 +0100 |
commit | 980ca3953084560806cd980d2ec16951d9e30c2b (patch) | |
tree | 80d77990b7c29685e706acb48ebb04756ed5d9de /ucb | |
parent | 40a19e61efff859d83e0689c0ed7d40c8e9ae8fe (diff) |
ucb: webdav-curl: don't set CURLOPT_NOBODY for OPTIONS
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>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-curl/CurlSession.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index 11dc964fbe00..4096115a40aa 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1526,9 +1526,8 @@ auto CurlSession::OPTIONS(OUString const& rURIReference, DAVResource result; ::std::pair<::std::vector<OUString> const&, DAVResource&> const headers(headerNames, result); - ::std::vector<CurlOption> const options{ - g_NoBody, { CURLOPT_CUSTOMREQUEST, "OPTIONS", "CURLOPT_CUSTOMREQUEST" } - }; + ::std::vector<CurlOption> const options{ { CURLOPT_CUSTOMREQUEST, "OPTIONS", + "CURLOPT_CUSTOMREQUEST" } }; CurlProcessor::ProcessRequest(*this, uri, "OPTIONS", options, &rEnv, nullptr, nullptr, nullptr, &headers); |