Lines Matching refs:hostname
110 /* Find the start of the hostname */
440 * [user[:password][;options]]@]hostname
513 char *hostname = Curl_dyn_ptr(host);
517 if(hostname[0] == '[') {
518 portptr = strchr(hostname, ']');
531 portptr = strchr(hostname, ':');
536 size_t keep = portptr - hostname;
572 /* this assumes 'hostname' now starts with [ */
573 static CURLUcode ipv6_parse(struct Curl_URL *u, char *hostname,
574 size_t hlen) /* length of hostname */
577 DEBUGASSERT(*hostname == '[');
580 hostname++;
584 len = strspn(hostname, "0123456789abcdefABCDEF:.");
588 if(hostname[len] == '%') {
592 char *h = &hostname[len + 1];
604 hostname[len] = ']'; /* insert end bracket */
605 hostname[len + 1] = 0; /* terminate the hostname */
609 /* hostname is fine */
616 hostname[hlen] = 0; /* end the address there */
617 if(1 != Curl_inet_pton(AF_INET6, hostname, dest))
623 strcpy(hostname, norm);
625 hostname[hlen + 1] = 0;
627 hostname[hlen] = ']'; /* restore ending bracket */
632 static CURLUcode hostname_check(struct Curl_URL *u, char *hostname,
633 size_t hlen) /* length of hostname */
636 DEBUGASSERT(hostname);
640 else if(hostname[0] == '[')
641 return ipv6_parse(u, hostname, hlen);
644 len = strcspn(hostname, " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%");
646 /* hostname with bad content */
772 const char *hostname = Curl_dyn_ptr(host);
773 per = strchr(hostname, '%');
781 CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
1047 * We allow omitted hostname (e.g. file:/<path>) -- valid according to
1057 * o it has no/blank hostname, or
1059 * o the hostname matches "localhost" (case-insensitively), or
1061 * o the hostname is a FQDN that resolves to this machine, or
1105 /* Invalid file://hostname/, expected localhost or 127.0.0.1 or
1205 const char *hostname = Curl_dyn_ptr(&host);
1207 if(checkprefix("ftp.", hostname))
1209 else if(checkprefix("dict.", hostname))
1211 else if(checkprefix("ldap.", hostname))
1213 else if(checkprefix("imap.", hostname))
1215 else if(checkprefix("smtp.", hostname))
1217 else if(checkprefix("pop3.", hostname))
1956 /* Skip hostname check, it's allowed to be empty. */