MT#60408 ModCurl: Switch from deprecated form of API
Switch to using of the mime API, since the previous
form of the API has been deprecated since 7.56.0 ver.
Fixes:
09: 01:02 ModCurl.cpp: In function 'bool curl_run_post(DSMSession*, const std::string&, const std::string&, bool)':
09: 01:02 ModCurl.cpp:384:18: warning: 'CURLFORM_COPYNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
09: 01:02 384 | CURLFORM_COPYNAME, varname.c_str(),
09: 01:02 | ^~~~~~~~~~~~~~~~~
09: 01:02 In file included from ModCurl.cpp:34:
09: 01:02 /usr/include/x86_64-linux-gnu/curl/curl.h:2500:3: note: declared here
09: 01:02 2500 | CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
09: 01:02 | ^~~~~~~~~~~~~~~~~
09: 01:02 ModCurl.cpp:385:18: warning: 'CURLFORM_COPYCONTENTS' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
09: 01:02 385 | CURLFORM_COPYCONTENTS, sc_sess->var[varname].c_str(), CURLFORM_END);
09: 01:02 | ^~~~~~~~~~~~~~~~~~~~~
09: 01:02 /usr/include/x86_64-linux-gnu/curl/curl.h:2503:3: note: declared here
09: 01:02 2503 | CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
09: 01:02 | ^~~~~~~~~~~~~~~~~~~~~
09: 01:02 ModCurl.cpp:383:17: warning: 'CURLFORMcode curl_formadd(curl_httppost**, curl_httppost**, ...)' is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations]
09: 01:02 383 | curl_formadd(&post, &last,
09: 01:02 | ~~~~~~~~~~~~^~~~~~~~~~~~~~
09: 01:02 384 | CURLFORM_COPYNAME, varname.c_str(),
09: 01:02 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
09: 01:02 385 | CURLFORM_COPYCONTENTS, sc_sess->var[varname].c_str(), CURLFORM_END);
09: 01:02 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
09: 01:02 /usr/include/x86_64-linux-gnu/curl/curl.h:2575:1: note: declared here
09: 01:02 2575 | curl_formadd(struct curl_httppost **httppost,
09: 01:02 | ^~~~~~~~~~~~
09: 01:02 ModCurl.cpp:400:16: warning: 'void curl_formfree(curl_httppost*)' is deprecated: since 7.56.0. Use curl_mime_free() [-Wdeprecated-declarations]
09: 01:02 400 | curl_formfree(post);
09: 01:02 | ~~~~~~~~~~~~~^~~~~~
09: 01:02 /usr/include/x86_64-linux-gnu/curl/curl.h:2611:1: note: declared here
09: 01:02 2611 | curl_formfree(struct curl_httppost *form);
09: 01:02 | ^~~~~~~~~~~~~
Change-Id: I3de731461f69044f18c688c2794dec824e18bc74