aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-12-20 22:46:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-12-20 22:46:12 +0000
commit7d1e3ebeed8ec2e3b70e2d7e11015e50e3ec291c (patch)
tree9dec5648559eb96eee629bba9e452299c42fb8c6
parent9e61dfe85e618c701b19cf5b83034578924b235c (diff)
explain tld_check_name()
-rw-r--r--lib/url.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index 781d1d11d..e012e01af 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2174,7 +2174,7 @@ CURLcode Curl_protocol_connect(struct connectdata *conn, bool *protocol_done)
* Helpers for IDNA convertions.
*/
#ifdef USE_LIBIDN
-static bool is_ASCII_name (const char *hostname)
+static bool is_ASCII_name(const char *hostname)
{
const unsigned char *ch = (const unsigned char*)hostname;
@@ -2188,8 +2188,8 @@ static bool is_ASCII_name (const char *hostname)
/*
* Check if characters in hostname is allowed in Top Level Domain.
*/
-static bool tld_check_name (struct SessionHandle *data,
- const char *ace_hostname)
+static bool tld_check_name(struct SessionHandle *data,
+ const char *ace_hostname)
{
size_t err_pos;
char *uc_name = NULL;
@@ -2245,7 +2245,9 @@ static void fix_hostname(struct connectdata *conn, struct hostname *host)
infof(data, "Failed to convert %s to ACE; %s\n",
host->name, Curl_idn_strerror(conn,rc));
else {
- tld_check_name(data, ace_hostname);
+ /* tld_check_name() displays a warning if the host name contains
+ "illegal" characters for this TLD */
+ (void)tld_check_name(data, ace_hostname);
host->encalloc = ace_hostname;
/* change the name pointer to point to the encoded hostname */