From c0d1c573b5a378faa59fc23c96329dc11a575217 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Sat, 27 Jan 2024 13:08:27 +0200 Subject: [PATCH] Fix EasyCurl --- tests/common/EasyCurl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/common/EasyCurl.cpp b/tests/common/EasyCurl.cpp index a1c29d4..c5958aa 100644 --- a/tests/common/EasyCurl.cpp +++ b/tests/common/EasyCurl.cpp @@ -73,6 +73,11 @@ EasyCurl::Response EasyCurl::request(const std::string &method, std::string uplo setOptions(CURLOPT_READFUNCTION, &read_callback); setOptions(CURLOPT_UPLOAD, 1L); setOptions(CURLOPT_INFILESIZE_LARGE, curl_off_t(upload.size())); + } else { + setOptions(CURLOPT_READDATA, nullptr); + setOptions(CURLOPT_READFUNCTION, nullptr); + setOptions(CURLOPT_UPLOAD, 0L); + setOptions(CURLOPT_INFILESIZE_LARGE, 0); } auto err = curl_easy_perform(m_curl);