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

New commits:
commit 980ca3953084560806cd980d2ec16951d9e30c2b
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Mar 7 20:10:48 2024 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Mar 8 10:24:34 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>

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);

Reply via email to