config2setopt.c: refactor config2setopts

Introduce sub functions

Closes #22215
This commit is contained in:
Daniel Stenberg 2026-06-29 12:02:14 +02:00
parent 7791b1629b
commit 8aeef462e3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 172 additions and 109 deletions

View file

@ -24,6 +24,7 @@ int main(int argc, char *argv[])
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(curl, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER");
curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/%VERSION");
mime1 = curl_mime_init(curl);
part1 = curl_mime_addpart(mime1);
curl_mime_data(part1, "value", CURL_ZERO_TERMINATED);
@ -44,7 +45,6 @@ int main(int argc, char *argv[])
mime2 = NULL;
curl_mime_name(part1, "file");
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime1);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/%VERSION");
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);