diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-10-02 13:01:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-10-02 13:01:44 +0000 |
commit | 19b284c21452b2c50924de3e0a04f5ed8040430d (patch) | |
tree | 4d7ac58fcea833c2d730affa4080f5e816318b92 /lib/url.c | |
parent | 6b3e3095ead3b496a9f5cad480c529f9d2b3c79d (diff) |
Gisle Vanem provided code that displays an error message when the (libidn
based) IDN conversion fails. This is really due to a missing suitable
function in the libidn API that I hope we can remove once libidn gets a
function like this.
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -116,6 +116,7 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by #include "progress.h" #include "cookie.h" #include "strequal.h" +#include "strerror.h" #include "escape.h" #include "strtok.h" #include "share.h" @@ -2078,8 +2079,8 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host) infof (data, "Input domain encoded as `%s'\n", stringprep_locale_charset ()); if (rc != IDNA_SUCCESS) - infof(data, "Failed to convert %s to ACE; IDNA error %d\n", - host->name, rc); + infof(data, "Failed to convert %s to ACE; %s\n", + host->name, Curl_idn_strerror(conn,rc)); else { host->encalloc = ace_hostname; /* change the name pointer to point to the encoded hostname */ |