Lines Matching defs:host
76 char *host;
93 free(u->host);
102 * Find the separator at the end of the host name, or the '?' in cases like
141 * URL encoding should be skipped for host names, otherwise IDN resolution
230 be the host name "data" with a specified port number. */
257 to the right of the host part. Oh crap, this is doomed to cause
269 /* protsep points to the start of the host name */
295 /* Check if there's any slash after the host name, and if so, remember
421 * strip them out of the host name
428 size_t *offset) /* to the host name */
438 * care of, so the host is at most
493 /* the host name starts at this offset */
509 UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
513 char *hostname = Curl_dyn_ptr(host);
545 Curl_dyn_setlen(host, keep);
662 * Returns the host type.
672 static int ipv4_normalize(struct dynbuf *host)
676 const char *c = Curl_dyn_ptr(host);
723 Curl_dyn_reset(host);
725 result = Curl_dyn_addf(host, "%u.%u.%u.%u",
734 Curl_dyn_reset(host);
735 result = Curl_dyn_addf(host, "%u.%u.%u.%u",
744 Curl_dyn_reset(host);
745 result = Curl_dyn_addf(host, "%u.%u.%u.%u",
755 Curl_dyn_reset(host);
756 result = Curl_dyn_addf(host, "%u.%u.%u.%u",
768 /* if necessary, replace the host content with a URL decoded version */
769 static CURLUcode urldecode_host(struct dynbuf *host)
772 const char *hostname = Curl_dyn_ptr(host);
785 Curl_dyn_reset(host);
786 result = Curl_dyn_addn(host, decoded, dlen);
798 struct dynbuf *host,
806 * Parse the login details and strip them out of the host name.
812 result = Curl_dyn_addn(host, auth + offset, authlen - offset);
818 uc = Curl_parse_port(u, host, has_scheme);
822 if(!Curl_dyn_len(host))
825 switch(ipv4_normalize(host)) {
829 uc = ipv6_parse(u, Curl_dyn_ptr(host), Curl_dyn_len(host));
832 uc = urldecode_host(host);
834 uc = hostname_check(u, Curl_dyn_ptr(host), Curl_dyn_len(host));
853 struct dynbuf host;
856 Curl_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
859 &host, !!u->scheme);
861 Curl_dyn_free(&host);
863 free(u->host);
864 u->host = Curl_dyn_ptr(&host);
1011 struct dynbuf host;
1015 Curl_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
1074 /* the URL includes a host name, it must match "localhost" or
1078 ptr += 9; /* now points to the slash after the host */
1084 /* the host name, NetBIOS computer name, can not contain disallowed
1086 host name */
1095 CURLcode code = Curl_dyn_addn(&host, ptr, len);
1103 ptr -= 2; /* now points to the // before the host in UNC */
1118 /* no host for file: URLs by default */
1119 Curl_dyn_reset(&host);
1166 hostp = p; /* host name starts here */
1192 /* find the end of the host name + port number */
1200 result = parse_authority(u, hostp, hostlen, flags, &host, schemelen);
1205 const char *hostname = Curl_dyn_ptr(&host);
1206 /* legacy curl-style guess based on host name */
1231 if(Curl_dyn_add(&host, "")) {
1342 u->host = Curl_dyn_ptr(&host);
1346 Curl_dyn_free(&host);
1400 DUP(u, in, host);
1451 ptr = u->host;
1510 else if(!u->host)
1541 if(u->host[0] == '[') {
1543 /* make it '[ host %25 zoneid ]' */
1545 size_t hostlen = strlen(u->host);
1547 if(Curl_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
1554 allochost = curl_easy_escape(NULL, u->host, 0);
1559 if(!Curl_is_ASCII_name(u->host)) {
1563 CURLcode result = Curl_idn_decode(u->host, &allochost);
1571 if(Curl_is_ASCII_name(u->host) && !strncmp("xn--", u->host, 4)) {
1575 CURLcode result = Curl_idn_encode(u->host, &allochost);
1592 allochost ? allochost : u->host,
1650 if(!Curl_is_ASCII_name(u->host)) {
1665 if(Curl_is_ASCII_name(u->host) && !strncmp("xn--", u->host, 4)) {
1719 storep = &u->host;
1790 storep = &u->host;