ucb/source/ucp/webdav-curl/CurlSession.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit e84c21aca4b72d9e86c856f717b3bf1b75f190af Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Wed Oct 19 11:40:28 2022 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Oct 19 11:42:33 2022 +0200 ucb: webdav-curl: enable cookie engine on 403 fallback Change-Id: Iafa8bdd183ef8a514b656ec41a9b7a6fa1e3acb9 diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index eda577ef722f..f986896c7e57 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -1384,6 +1384,10 @@ auto CurlProcessor::ProcessRequest( { break; } + // both fallbacks need cookie engine enabled + CURLcode rc + = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIEFILE, ""); + assert(rc == CURLE_OK); if (cookies.isEmpty() // retry only once - could be expired... && rSession.m_URI.GetScheme() == "https") // only encrypted { @@ -1391,9 +1395,6 @@ auto CurlProcessor::ProcessRequest( = TryImportCookies(rSession.m_xContext, rSession.m_URI.GetHost()); if (!cookies.isEmpty()) { - CURLcode rc = curl_easy_setopt(rSession.m_pCurl.get(), - CURLOPT_COOKIEFILE, ""); - assert(rc == CURLE_OK); rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIE, cookies.getStr()); assert(rc == CURLE_OK);