ares: use ares_strerror() to retrieve error messages

Add optional detail to `Curl_resolver_error()` to add to failure message
where available. This makes, for c-ares, the reason for a failed
resource available to the user without extra trace config.

When "dns" tracing enabled, print the c-ares server config at the start
of a resolve.

Closes #18251
This commit is contained in:
Stefan Eissing 2025-08-11 15:58:11 +02:00 committed by Daniel Stenberg
parent 8ebea37eb1
commit 6b111f0a8c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 15 additions and 31 deletions

View file

@ -201,7 +201,7 @@ CURLcode Curl_resolv_check(struct Curl_easy *data,
CURLcode Curl_resolv_pollset(struct Curl_easy *data,
struct easy_pollset *ps);
CURLcode Curl_resolver_error(struct Curl_easy *data);
CURLcode Curl_resolver_error(struct Curl_easy *data, const char *detail);
#ifdef CURLRES_SYNCH
/*