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

Migrate curl_formadd from form API to mime API (deprecated in Ubuntu Noble) #415

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

j-rivero
Copy link
Contributor

🦟 Bug fix

Summary

The new curl 8.x series deprecate part of the CURL API that is being used in fuel-tools. I was totally new to the CURL APIs but there was a good documentation on how to migrate the old form API to the new MIME API in https://curl.se/libcurl/c/libcurl-tutorial.html (search by Converting from deprecated form api to mime api) so I went ahead and try to get the thing working.

I don't see any new test failure but probably we need someone with more knowledge of fuel to review that things are actually working.

I ran the ASAN analizer but found that we already have problems on the ASAN build (although Jenkins is not reporting them probably because gazebosim/gz-cmake#240).

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@j-rivero j-rivero requested a review from nkoenig as a code owner April 11, 2024 15:50
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Apr 11, 2024
@j-rivero
Copy link
Contributor Author

I ran the ASAN analizer but found that we already have problems on the ASAN build (although Jenkins is not reporting them probably because gazebosim/gz-cmake#240).

Fixed the memory problems in #416

@@ -314,8 +307,7 @@ RestResponse Rest::Request(HttpMethod _method,
}
else if (_method == HttpMethod::POST_FORM)
{
formpost = BuildFormPost(_form);
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
AddFormPost(multipart, _form);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be the following line here?

curl_easy_setopt(curl, CURLOPT_MIMEPOST, multipart);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! reviewing the deprecation instruction you are right.

@nkoenig nkoenig merged commit 3dbc344 into gz-fuel-tools9 Apr 29, 2024
8 of 9 checks passed
@nkoenig nkoenig deleted the jrivero/migrate_out_of_curl_formadd branch April 29, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants