diff --git a/include/http/libcurl_http_client.h b/include/http/libcurl_http_client.h index 5204989..2291f32 100644 --- a/include/http/libcurl_http_client.h +++ b/include/http/libcurl_http_client.h @@ -297,7 +297,7 @@ namespace azure { namespace storage_lite { for (int i = 0; i < m_size; i++) { CURL *h = curl_easy_init(); curl_easy_setopt(h, CURLOPT_CAINFO, ca_path.c_str()); - curl_easy_setopt(h, CURLOPT_VERBOSE, 1L); + //curl_easy_setopt(h, CURLOPT_VERBOSE, 1L); m_handles.push(h); } } diff --git a/src/http/libcurl_http_client.cpp b/src/http/libcurl_http_client.cpp index cb6549c..a1ed610 100644 --- a/src/http/libcurl_http_client.cpp +++ b/src/http/libcurl_http_client.cpp @@ -3,6 +3,7 @@ #include "http/libcurl_http_client.h" #include "constants.h" +#include "logging.h" namespace azure { namespace storage_lite { @@ -61,16 +62,13 @@ namespace azure { namespace storage_lite { check_code(curl_easy_setopt(m_curl, CURLOPT_HTTPHEADER, m_slist)); const auto result = curl_easy_perform(m_curl); - long code = 0; - curl_easy_getinfo(m_curl, CURLINFO_RESPONSE_CODE, &code); - if (code != 200) { - printf("error: server responded with code %ld\n", code); - } + /* + * Need further testing to add this. + if (result != 0) { + logger::log(log_level::error,"curl_easy_perform returned %d: %s\n", result, curl_easy_strerror(result)); + } + */ check_code(result); // has nothing to do with checks, just resets errno for succeeded ops. - if (result != 0) { - printf("curl_easy_perform returned %d: %s\n", result, curl_easy_strerror(result)); - } - return result; }