Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTTPS downloads using curl #2460

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/mavsdk/core/curl_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ 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_SSL_VERIFYPEER, 1L);
curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L);
res = curl_easy_perform(curl.get());
content = readBuffer;

Expand Down Expand Up @@ -108,6 +110,8 @@ 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_SSL_VERIFYPEER, 1L);
curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L);
res = curl_easy_perform(curl.get());
fclose(fp);

Expand Down
10,399 changes: 6,396 additions & 4,003 deletions src/mavsdk_server/src/generated/action/action.pb.cc

Large diffs are not rendered by default.

7,245 changes: 3,935 additions & 3,310 deletions src/mavsdk_server/src/generated/action/action.pb.h

Large diffs are not rendered by default.

6,160 changes: 3,823 additions & 2,337 deletions src/mavsdk_server/src/generated/action_server/action_server.pb.cc

Large diffs are not rendered by default.

4,302 changes: 2,329 additions & 1,973 deletions src/mavsdk_server/src/generated/action_server/action_server.pb.h

Large diffs are not rendered by default.

1,672 changes: 1,004 additions & 668 deletions src/mavsdk_server/src/generated/arm_authorizer_server/arm_authorizer_server.pb.cc

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3,165 changes: 1,972 additions & 1,193 deletions src/mavsdk_server/src/generated/calibration/calibration.pb.cc

Large diffs are not rendered by default.

2,324 changes: 1,246 additions & 1,078 deletions src/mavsdk_server/src/generated/calibration/calibration.pb.h

Large diffs are not rendered by default.

18,993 changes: 11,392 additions & 7,601 deletions src/mavsdk_server/src/generated/camera/camera.pb.cc

Large diffs are not rendered by default.

Loading
Loading