curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

CURLOPT_RESOLVE problem

From: James Read via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 19 Nov 2020 14:48:01 +0000

Hi,

I have some error messages in libcurl logs like as follows:

== Info: Couldn't parse CURLOPT_RESOLVE entry '
http://kitcheneroktoberfest.com/:443:69.172.201.153'!
== Info: Couldn't parse CURLOPT_RESOLVE entry '
http://kitcheneroktoberfest.com/:80:69.172.201.153'!

The following is the relevant code snippet which is trying to use
CURLOPT_RESOLVE:

snprintf(buffer1, 1024, "%s:443:%s", url, ip);
snprintf(buffer2, 1024, "%s:80:%s", url, ip);
struct curl_slist *dns1, *dns2;
dns1 = curl_slist_append(NULL, buffer1);
dns2 = curl_slist_append(dns1, buffer2);
curl_easy_setopt(conn->easy, CURLOPT_RESOLVE, dns2);

What am I doing wrong?

James Read


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2020-11-19