diff --git a/src/mavsdk/core/curl_wrapper.cpp b/src/mavsdk/core/curl_wrapper.cpp index 30ef52aa9..24e2aa918 100644 --- a/src/mavsdk/core/curl_wrapper.cpp +++ b/src/mavsdk/core/curl_wrapper.cpp @@ -29,6 +29,7 @@ bool CurlWrapper::download_text(const std::string& url, std::string& content) curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str()); curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &readBuffer); + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, "http"); res = curl_easy_perform(curl.get()); content = readBuffer; @@ -108,6 +109,7 @@ bool CurlWrapper::download_file_to_path( curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, NULL); curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, fp); curl_easy_setopt(curl.get(), CURLOPT_NOPROGRESS, 0L); + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, "http"); res = curl_easy_perform(curl.get()); fclose(fp);