From: Steve Holme Date: Sun, 9 Feb 2020 04:37:52 +0000 (+0000) Subject: url: Include the failure reason when curl_win32_idn_to_ascii() fails X-Git-Tag: curl-7_69_0~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8f4a9446550f2da7f1dc1892f780aacc7115ec3;p=thirdparty%2Fcurl.git url: Include the failure reason when curl_win32_idn_to_ascii() fails Provide the failure reason in the failf() info just as we do for the libidn2 version of code. Closes #4899 --- diff --git a/lib/url.c b/lib/url.c index 07d429e35e..f3b26dafae 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1514,7 +1514,9 @@ static CURLcode idnconvert_hostname(struct connectdata *conn, host->name = host->encalloc; } else { - failf(data, "Failed to convert %s to ACE;\n", host->name); + char buffer[STRERROR_LEN]; + failf(data, "Failed to convert %s to ACE; %s\n", host->name, + Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); return CURLE_URL_MALFORMAT; } #else