Lines Matching defs:host

321   Curl_safefree(data->state.aptr.host);
580 Curl_free_idnconverted_hostname(&conn->host);
583 Curl_free_idnconverted_hostname(&conn->http_proxy.host);
584 Curl_free_idnconverted_hostname(&conn->socks_proxy.host);
589 Curl_safefree(conn->http_proxy.host.rawalloc); /* http proxy name buffer */
590 Curl_safefree(conn->socks_proxy.host.rawalloc); /* socks proxy name buffer */
597 Curl_safefree(conn->host.rawalloc); /* host name buffer */
598 Curl_safefree(conn->conn_to_host.rawalloc); /* host name buffer */
713 strcasecompare(data->host.name, needle->host.name))
955 /* Look up the bundle with all the connections to this particular host.
962 infof(data, "Found bundle for host: %p [%s]",
1068 /* don't mix connections that use the "connect to host" feature and
1208 if(!strcasecompare(needle->host.name, check->host.name) ||
1840 failf(data, "Too long host name (maximum is %d)", MAX_URL_LEN);
1858 /* make sure the connect struct gets its own copy of the host name */
1859 conn->host.rawalloc = strdup(hostname ? hostname : "");
1860 if(!conn->host.rawalloc)
1862 conn->host.name = conn->host.rawalloc;
1867 result = Curl_idnconvert_hostname(&conn->host);
1875 if(Curl_hsts(data->hsts, conn->host.name, TRUE)) {
2081 * Detect what (if any) proxy to use. Remember that this selects a host
2096 * no_proxy=domain1.dom,host.domain2.dom
2175 * host name, so that we can reuse an existing connection
2176 * that may exist registered to the same proxy host.
2186 char *host = NULL;
2317 if(conn->port < 0 || sockstype || !conn->socks_proxy.host.rawalloc)
2321 /* now, clone the proxy host name */
2322 uc = curl_url_get(uhp, CURLUPART_HOST, &host, CURLU_URLDECODE);
2328 if(sockstype && strcasecompare(UNIX_SOCKET_PREFIX, host)) {
2337 free(host);
2338 host = aprintf(UNIX_SOCKET_PREFIX"%s", path);
2339 if(!host) {
2343 Curl_safefree(proxyinfo->host.rawalloc);
2344 proxyinfo->host.rawalloc = host;
2345 proxyinfo->host.name = host;
2346 host = NULL;
2352 Curl_safefree(proxyinfo->host.rawalloc);
2353 proxyinfo->host.rawalloc = host;
2354 if(host[0] == '[') {
2356 size_t len = strlen(host);
2357 host[len-1] = 0; /* clear the trailing bracket */
2358 host++;
2361 proxyinfo->host.name = host;
2362 host = NULL;
2370 free(host);
2458 if(Curl_check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY] ?
2466 /* if the host is not in the noproxy list, detect proxy. */
2495 * If this is supposed to use a proxy, we need to figure out the proxy host
2497 * connection that may exist registered to the same proxy host.
2516 if(conn->http_proxy.host.rawalloc) {
2539 if(conn->socks_proxy.host.rawalloc) {
2540 if(!conn->http_proxy.host.rawalloc) {
2759 ret = Curl_parsenetrc(conn->host.name,
2763 infof(data, "Couldn't find host %s in the %s file; using defaults",
2764 conn->host.name,
2775 different host or similar. */
2869 * Parses a "host:port" string to connect to.
2874 const char *host,
2892 if(!host || !*host)
2895 host_dup = strdup(host);
2927 * hostptr first, but I can't see anything wrong with that as no host
2941 *host_portno = '\0'; /* cut off number from host name */
2946 failf(data, "No valid port number in connect to host string (%s)",
2956 /* now, clone the cleaned host name */
2999 conn->host.name,
3043 * to host" and "connect to port" of the first string that matches.
3050 char *host = NULL;
3053 while(conn_to_host && !host && port == -1) {
3055 &host, &port);
3059 if(host && *host) {
3060 conn->conn_to_host.rawalloc = host;
3061 conn->conn_to_host.name = host;
3064 infof(data, "Connecting to hostname: %s", host);
3067 /* no "connect to host" */
3069 Curl_safefree(host);
3087 if(data->asi && !host && (port == -1) &&
3109 host = conn->host.rawalloc;
3114 srcalpnid, host, conn->remote_port, /* from */
3122 srcalpnid, host, conn->remote_port, /* from */
3127 char *hostd = strdup((char *)as->dst.host);
3137 Curl_alpnid2str(srcalpnid), host, conn->remote_port,
3174 /* Unix domain sockets are local. The host gets ignored, just use the
3203 struct hostname *host;
3209 host = conn->bits.socksproxy ? &conn->socks_proxy.host :
3210 &conn->http_proxy.host;
3212 conn->hostname_resolve = strdup(host->name);
3224 failf(data, "Couldn't resolve proxy '%s'", host->dispname);
3243 connhost = conn->bits.conn_to_host ? &conn->conn_to_host : &conn->host;
3250 /* Resolve target host right on */
3261 failf(data, "Failed to resolve host '%s' with timeout after %"
3267 failf(data, "Could not resolve host: %s", connhost->dispname);
3283 if(!unix_path && conn->socks_proxy.host.name &&
3285 conn->socks_proxy.host.name, sizeof(UNIX_SOCKET_PREFIX)))
3286 unix_path = conn->socks_proxy.host.name + sizeof(UNIX_SOCKET_PREFIX) - 1;
3367 * the authority of the URL, e.g. conn->host. For example:
3373 * Since connection reuse does not match on conn->host necessarily, we
3374 * switch `existing` conn to `temp` conn's host settings.
3377 * requests for another host through the different SNI?
3379 Curl_free_idnconverted_hostname(&existing->host);
3381 Curl_safefree(existing->host.rawalloc);
3383 existing->host = temp->host;
3384 temp->host.rawalloc = NULL;
3385 temp->host.encalloc = NULL;
3403 * existing one, and resolves host name.
3533 result = Curl_idnconvert_hostname(&conn->http_proxy.host);
3538 result = Curl_idnconvert_hostname(&conn->socks_proxy.host);
3550 * Check whether the host and the "connect to host" are equal.
3554 strcasecompare(conn->conn_to_host.name, conn->host.name)) {
3668 conn->bits.proxy?"proxy":"host",
3669 conn->socks_proxy.host.name ? conn->socks_proxy.host.dispname :
3670 conn->http_proxy.host.name ? conn->http_proxy.host.dispname :
3671 conn->host.dispname);
3673 infof(data, "Re-using existing connection with host %s",
3674 conn->host.dispname);
3709 infof(data, "No more connections allowed to host: %zu",