Lines Matching refs:host
75 char *host; member
95 free(u->host); in free_urlhandle()
512 UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host, in Curl_parse_port() argument
516 char *hostname = Curl_dyn_ptr(host); in Curl_parse_port()
548 Curl_dyn_setlen(host, keep); in Curl_parse_port()
667 static int ipv4_normalize(struct dynbuf *host) in ipv4_normalize() argument
671 const char *c = Curl_dyn_ptr(host); in ipv4_normalize()
716 Curl_dyn_reset(host); in ipv4_normalize()
718 result = Curl_dyn_addf(host, "%u.%u.%u.%u", in ipv4_normalize()
727 Curl_dyn_reset(host); in ipv4_normalize()
728 result = Curl_dyn_addf(host, "%u.%u.%u.%u", in ipv4_normalize()
737 Curl_dyn_reset(host); in ipv4_normalize()
738 result = Curl_dyn_addf(host, "%u.%u.%u.%u", in ipv4_normalize()
748 Curl_dyn_reset(host); in ipv4_normalize()
749 result = Curl_dyn_addf(host, "%u.%u.%u.%u", in ipv4_normalize()
762 static CURLUcode urldecode_host(struct dynbuf *host) in urldecode_host() argument
765 const char *hostname = Curl_dyn_ptr(host); in urldecode_host()
778 Curl_dyn_reset(host); in urldecode_host()
779 result = Curl_dyn_addn(host, decoded, dlen); in urldecode_host()
791 struct dynbuf *host, in parse_authority() argument
805 result = Curl_dyn_addn(host, auth + offset, authlen - offset); in parse_authority()
811 uc = Curl_parse_port(u, host, has_scheme); in parse_authority()
815 if(!Curl_dyn_len(host)) in parse_authority()
818 switch(ipv4_normalize(host)) { in parse_authority()
822 uc = ipv6_parse(u, Curl_dyn_ptr(host), Curl_dyn_len(host)); in parse_authority()
825 uc = urldecode_host(host); in parse_authority()
827 uc = hostname_check(u, Curl_dyn_ptr(host), Curl_dyn_len(host)); in parse_authority()
845 struct dynbuf host; in Curl_url_set_authority() local
848 Curl_dyn_init(&host, CURL_MAX_INPUT_LENGTH); in Curl_url_set_authority()
851 CURLU_DISALLOW_USER, &host, !!u->scheme); in Curl_url_set_authority()
853 Curl_dyn_free(&host); in Curl_url_set_authority()
855 free(u->host); in Curl_url_set_authority()
856 u->host = Curl_dyn_ptr(&host); in Curl_url_set_authority()
1003 struct dynbuf host; in parseurl() local
1007 Curl_dyn_init(&host, CURL_MAX_INPUT_LENGTH); in parseurl()
1087 CURLcode code = Curl_dyn_addn(&host, ptr, len); in parseurl()
1111 Curl_dyn_reset(&host); in parseurl()
1192 result = parse_authority(u, hostp, hostlen, flags, &host, schemelen); in parseurl()
1197 const char *hostname = Curl_dyn_ptr(&host); in parseurl()
1224 if(Curl_dyn_add(&host, "")) { in parseurl()
1337 u->host = Curl_dyn_ptr(&host); in parseurl()
1341 Curl_dyn_free(&host); in parseurl()
1395 DUP(u, in, host); in curl_url_dup()
1450 ptr = u->host; in curl_url_get()
1520 else if(!u->host) in curl_url_get()
1552 if(u->host[0] == '[') { in curl_url_get()
1556 size_t hostlen = strlen(u->host); in curl_url_get()
1558 if(Curl_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host, in curl_url_get()
1565 allochost = curl_easy_escape(NULL, u->host, 0); in curl_url_get()
1570 if(!Curl_is_ASCII_name(u->host)) { in curl_url_get()
1574 CURLcode result = Curl_idn_decode(u->host, &allochost); in curl_url_get()
1582 if(Curl_is_ASCII_name(u->host) && !strncmp("xn--", u->host, 4)) { in curl_url_get()
1586 CURLcode result = Curl_idn_encode(u->host, &allochost); in curl_url_get()
1608 allochost ? allochost : u->host, in curl_url_get()
1666 if(!Curl_is_ASCII_name(u->host)) { in curl_url_get()
1681 if(Curl_is_ASCII_name(u->host) && !strncmp("xn--", u->host, 4)) { in curl_url_get()
1735 storep = &u->host; in curl_url_set()
1809 storep = &u->host; in curl_url_set()