Skip to content
Permalink
Browse files

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
  • Loading branch information
captain-caveman2k committed Feb 9, 2020
1 parent 05d3312 commit f8f4a9446550f2da7f1dc1892f780aacc7115ec3
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit f8f4a94

Please sign in to comment.
You can’t perform that action at this time.