mirror of
https://github.com/curl/curl.git
synced 2026-06-05 11:04:16 +03:00
use tld_strerror() only if previously detected, since otherwise we can't
work with libidn < 0.5.6
This commit is contained in:
parent
1239e48304
commit
c274e51654
1 changed files with 13 additions and 2 deletions
15
lib/url.c
15
lib/url.c
|
|
@ -2095,11 +2095,22 @@ static bool tld_check_name (struct SessionHandle *data,
|
|||
rc = tld_check_lz(uc_name, &err_pos, NULL);
|
||||
if (rc == TLD_INVALID)
|
||||
infof(data, "WARNING: %s; pos %u = `%c'/0x%02X\n",
|
||||
tld_strerror(rc), err_pos, uc_name[err_pos],
|
||||
#ifdef HAVE_TLD_STRERROR
|
||||
tld_strerror(rc),
|
||||
#else
|
||||
"<no msg>",
|
||||
#endif
|
||||
err_pos, uc_name[err_pos],
|
||||
uc_name[err_pos] & 255);
|
||||
else if (rc != TLD_SUCCESS)
|
||||
infof(data, "WARNING: TLD check for %s failed; %s\n",
|
||||
uc_name, tld_strerror(rc));
|
||||
uc_name,
|
||||
#ifdef HAVE_TLD_STRERROR
|
||||
tld_strerror(rc)
|
||||
#else
|
||||
"<no msg>"
|
||||
#endif
|
||||
);
|
||||
if (uc_name)
|
||||
idn_free(uc_name);
|
||||
return (rc == TLD_SUCCESS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue