Suppose you ask libcurl to resolve a hostname (e.g. google.com) to IPv6 addresses only. But you only have IPv4 connectivity. libcurl would correctly fail with CURLE_COULDNT_CONNECT. But the error buffer set by CURLOPT_ERRORBUFFER would be empty.
I think adding a failf() call above this line would work:
https://github.com/bagder/curl/blob/master/lib/connect.c#L1176
But I don't know if that's the right place to do it.
Suppose you ask libcurl to resolve a hostname (e.g.
google.com) to IPv6 addresses only. But you only have IPv4 connectivity. libcurl would correctly fail withCURLE_COULDNT_CONNECT. But the error buffer set byCURLOPT_ERRORBUFFERwould be empty.I think adding a
failf()call above this line would work:https://github.com/bagder/curl/blob/master/lib/connect.c#L1176
But I don't know if that's the right place to do it.