aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2020-02-09 04:37:52 +0000
committerSteve Holme <steve_holme@hotmail.com>2020-02-09 11:38:54 +0000
commitf8f4a9446550f2da7f1dc1892f780aacc7115ec3 (patch)
tree0013af3699f2348d414c71d2fa670da09628565d /lib
parent05d3312f77007622f524175e049509687130805d (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 07d429e35..f3b26dafa 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