ucb/source/ucp/webdav-curl/CurlSession.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7e5891a327889be3a052594efd7862ed5be13606
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Mar 7 20:10:48 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Mar 19 20:55:19 2024 +0100

    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.st...@allotropia.de>
    (cherry picked from commit 980ca3953084560806cd980d2ec16951d9e30c2b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164501
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index a54e9d1addfb..18bd7ab61e2b 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1519,9 +1519,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);

Reply via email to