Repository: gadgetron/gadgetron (language: python)

Issue:
Remove CPR and use libcurl directly
Using [CPR](https://github.com/libcpr/cpr) (a wrapper around libcurl) has caused problems in creating cross-platform conda packages and environments, so we're removing it as a dependency and using libcurl directly.


Discussion / hints:

Fix patch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c606cd67a..a877cf778 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ endif ()
 #VERSIONING AND INSTALL PATHS
 set(GADGETRON_VERSION_MAJOR 4)
 set(GADGETRON_VERSION_MINOR 4)
-set(GADGETRON_VERSION_PATCH 3)
+set(GADGETRON_VERSION_PATCH 4)
 set(GADGETRON_VERSION_STRING ${GADGETRON_VERSION_MAJOR}.${GADGETRON_VERSION_MINOR}.${GADGETRON_VERSION_PATCH})
 set(GADGETRON_SOVERSION ${GADGETRON_VERSION_MAJOR}.${GADGETRON_VERSION_MINOR})
 find_package(Git)
diff --git a/core/Storage.cpp b/core/Storage.cpp
index b3976f141..853afa968 100644
--- a/core/Storage.cpp
+++ b/core/Storage.cpp
@@ -28,7 +28,8 @@ size_t content_write_callback(char* ptr, size_t size, size_t nmemb, std::strings
 
 // Copies the request body
 size_t content_read_callback(char* dest, size_t size, size_t nmemb, std::istream* stream) {
-    return stream->readsome(dest, size * nmemb);
+    stream->read(dest, size * nmemb);
+    return stream->gcount();
 }
 
 template <typename T> using CurlHandle = std::unique_ptr<T, std::function<void(T*)>>;


Test patch:
diff --git a/apps/gadgetron/test/storage_test.cpp b/apps/gadgetron/test/storage_test.cpp
index 593604bb2..0af161f7c 100644
--- a/apps/gadgetron/test/storage_test.cpp
+++ b/apps/gadgetron/test/storage_test.cpp
@@ -269,7 +269,7 @@ TEST_F(StorageTest, storage_spaces_basic) {
     ASSERT_EQ(x, *item);
 
     hoNDArray<float> y(2, 2);
-    std::fill(x.begin(), x.end(), 23);
+    std::fill(y.begin(), y.end(), 23);
     storage.session->store("stuff", y);
 
     item = storage.session->get_latest<hoNDArray<float>>("stuff");