Lines Matching refs:host

309 	char *hosttail, *cause = "unknown", *newline, *host, *port, *buf = NULL;  in url_get()  local
353 host = newline + sizeof(HTTP_URL) - 1; in url_get()
358 host = newline + sizeof(FTP_URL) - 1; in url_get()
365 host = newline + sizeof(HTTPS_URL) - 1; in url_get()
376 path = strchr(host, '/'); /* Find path */ in url_get()
384 p = strchr(host, '@'); in url_get()
387 credentials = recode_credentials(host); in url_get()
390 memmove(host, p, strlen(p) + 1); in url_get()
391 path = strchr(host, '/'); in url_get()
397 path = strchr(host,'\0'); /* we have outfile. */ in url_get()
445 sslhost = strdup(host); in url_get()
450 proxyhost = strdup(host); in url_get()
457 host = proxyurl + sizeof(HTTP_URL) - 1; in url_get()
459 host = proxyurl + sizeof(FTP_URL) - 1; in url_get()
464 if (EMPTYSTRING(host)) { in url_get()
470 path = strchr(host, '/'); /* remove trailing / on host */ in url_get()
474 path = strchr(host, '@'); /* look for credentials in proxy */ in url_get()
477 if (strchr(host, ':') == NULL) { in url_get()
481 proxy_credentials = recode_credentials(host); in url_get()
488 for (host = 1 + strchr(proxyurl + 5, ':'); *host != '@'; in url_get()
489 host++) in url_get()
490 *host = '*'; in url_get()
492 host = path + 1; in url_get()
498 if (*host == '[' && (hosttail = strrchr(host, ']')) != NULL && in url_get()
500 host++; in url_get()
503 if (asprintf(&full_host, "[%s]", host) == -1) in url_get()
507 hosttail = host; in url_get()
520 if ((full_host = strdup(host)) == NULL) in url_get()
524 "save as %s, auth %s.\n", host, port, path, in url_get()
531 error = getaddrinfo(host, port, &hints, &res0); in url_get()
538 error = getaddrinfo(host, pbuf, &hints, &res0); in url_get()
542 error = getaddrinfo(host, pbuf, &hints, &res0); in url_get()
546 warnx("%s: %s", host, gai_strerror(error)); in url_get()
642 sslhost = strdup(host); in url_get()
693 cookie_get(host, path, ishttpsurl, &buf); in url_get()
741 } else if (strchr(host, ':')) { in url_get()
746 h = strdup(host); in url_get()
754 ftp_printf(fin, "%s", host); in url_get()
1119 warnx("Improper response from %s", host); in url_get()
1250 char *cp, *url, *host, *dir, *file, *portnum; in auto_fetch() local
1283 host = dir = file = portnum = username = pass = NULL; in auto_fetch()
1317 host = url; in auto_fetch()
1326 host += sizeof(FTP_URL) - 1; in auto_fetch()
1327 dir = strchr(host, '/'); in auto_fetch()
1332 userend = strchr(host, ':'); in auto_fetch()
1333 passend = strchr(host, '@'); in auto_fetch()
1336 username = host; in auto_fetch()
1338 host = passend + 1; in auto_fetch()
1340 passagain = strchr(host, '@'); in auto_fetch()
1360 if (host[0] == '[') { in auto_fetch()
1361 cp = strchr(host, ']'); in auto_fetch()
1364 host++; in auto_fetch()
1369 cp = host; in auto_fetch()
1371 cp = host; in auto_fetch()
1401 dir = strchr(host, ':'); in auto_fetch()
1403 if (EMPTYSTRING(host)) { in auto_fetch()
1432 username, pass ? "XXXX" : NULL, host, portnum, in auto_fetch()
1442 xargv[1] = host; in auto_fetch()
1461 !ftp_login(host, username, pass)))) { in auto_fetch()
1462 warnx("Can't connect or login to host `%s'", host); in auto_fetch()
1707 proxy_connect(int socket, char *host, char *cookie) in proxy_connect() argument
1713 if (*host == '[' && (hosttail = strrchr(host, ']')) != NULL && in proxy_connect()
1715 host++; in proxy_connect()
1718 hosttail = host; in proxy_connect()
1730 host, port, host, port, cookie, HTTP_USER_AGENT); in proxy_connect()
1734 host, port, host, port, HTTP_USER_AGENT); in proxy_connect()