From 93cee61939af90916360b88e0ba07195732da72b Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Fri, 12 Apr 2024 12:08:06 +1000 Subject: [PATCH] Workaround for unknown bug in libcurl and/or ssl --- src/zarr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/zarr.cpp b/src/zarr.cpp index 4728630..3eafa63 100644 --- a/src/zarr.cpp +++ b/src/zarr.cpp @@ -170,11 +170,13 @@ Error ZarrFunctions::GetChunk(const MString& var, const std::vector& chu if(!suc) { michlib::message(str + " not found in cache, downloading"); - auto [out, res] = GetUrl(chandle, str); + CURLRAII myhandle; // TODO: remove this workaround of unknown bug + //auto [out, res] = GetUrl(chandle, str); + auto [out, res] = GetUrl(myhandle, str); if(res != CURLE_OK) return Error(pref, MString("can't download chunk: ") + chandle.Err()); long respcode; - curl_easy_getinfo(chandle, CURLINFO_RESPONSE_CODE, &respcode); - michlib::message("Response: ", respcode); + //curl_easy_getinfo(chandle, CURLINFO_RESPONSE_CODE, &respcode); + curl_easy_getinfo(myhandle, CURLINFO_RESPONSE_CODE, &respcode); if(respcode == 403) out = ""; // Failed chunk download mean that this chunk contains only fill cache->Put(str, out, 3600); content = std::move(out);