Lines Matching refs:config
377 {"config", ARG_FILE, 'K', C_CONFIG},
608 {"trace-config", ARG_STRG, ' ', C_TRACE_CONFIG},
936 struct OperationConfig *config,
939 if(config->httpversion &&
940 (config->httpversion != httpversion))
943 config->httpversion = httpversion;
947 const char *config)
953 tmp = strdup(config);
1030 struct OperationConfig *config)
1048 if(config->query) {
1049 CURLcode result = curlx_dyn_addf(&dyn, "%s&%s", config->query, query);
1054 free(config->query);
1055 config->query = curlx_dyn_ptr(&dyn);
1059 config->query = query;
1067 struct OperationConfig *config)
1128 config->jsoned = TRUE;
1130 if(curlx_dyn_len(&config->postdata)) {
1133 curlx_dyn_addn(&config->postdata, "&", 1))
1137 if(!err && curlx_dyn_addn(&config->postdata, postdata, size))
1142 config->postfields = curlx_dyn_ptr(&config->postdata);
1213 struct OperationConfig *config)
1358 err = getstr(&config->dns_ipv4_addr, nextarg, DENY_BLANK);
1365 err = getstr(&config->dns_ipv6_addr, nextarg, DENY_BLANK);
1372 err = getstr(&config->oauth_bearer, nextarg, DENY_BLANK);
1375 config->authtype |= CURLAUTH_BEARER;
1379 err = secs2ms(&config->connecttimeout_ms, nextarg);
1382 err = getstr(&config->doh_url, nextarg, ALLOW_BLANK);
1383 if(!err && config->doh_url && !config->doh_url[0])
1385 Curl_safefree(config->doh_url);
1388 err = getstr(&config->cipher_list, nextarg, DENY_BLANK);
1395 err = getstr(&config->dns_interface, nextarg, DENY_BLANK);
1398 config->disable_epsv = toggle;
1401 config->disallow_username_in_url = toggle;
1404 config->disable_epsv = (!toggle)?TRUE:FALSE;
1411 err = getstr(&config->dns_servers, nextarg, DENY_BLANK);
1434 config->noalpn = (!toggle)?TRUE:FALSE;
1439 config->recvpersecond = value;
1440 config->sendpersecond = value;
1450 config->encoding = toggle;
1453 config->tr_encoding = toggle;
1457 config->authtype |= CURLAUTH_DIGEST;
1459 config->authtype &= ~CURLAUTH_DIGEST;
1463 config->authtype &= ~CURLAUTH_NEGOTIATE;
1465 config->authtype |= CURLAUTH_NEGOTIATE;
1471 config->authtype &= ~CURLAUTH_NTLM;
1473 config->authtype |= CURLAUTH_NTLM;
1479 config->authtype &= ~CURLAUTH_NTLM_WB;
1481 config->authtype |= CURLAUTH_NTLM_WB;
1487 config->authtype |= CURLAUTH_BASIC;
1489 config->authtype &= ~CURLAUTH_BASIC;
1493 config->authtype = CURLAUTH_ANY;
1502 config->ftp_create_dirs = toggle;
1505 config->create_dirs = toggle;
1508 err = oct2nummax(&config->create_file_mode, nextarg, 0777);
1513 err = str2num(&config->maxredirs, nextarg);
1514 if(!err && (config->maxredirs < -1))
1518 err = getstr(&config->ipfs_gateway, nextarg, DENY_BLANK);
1524 config->proxyntlm = toggle;
1528 config->crlf = toggle;
1531 config->authtype |= CURLAUTH_AWS_SIGV4;
1532 err = getstr(&config->aws_sigv4, nextarg, DENY_BLANK);
1539 err = getstr(&config->iface, nextarg, DENY_BLANK);
1546 err = getstr(&config->krblevel, nextarg, DENY_BLANK);
1549 config->haproxy_protocol = toggle;
1552 err = getstr(&config->haproxy_clientip, nextarg, DENY_BLANK);
1557 config->max_filesize = value;
1560 config->disable_eprt = toggle;
1563 config->disable_eprt = (!toggle)?TRUE:FALSE;
1566 config->xattr = toggle;
1569 if(!config->url_get)
1570 config->url_get = config->url_list;
1572 if(config->url_get) {
1575 while(config->url_get && (config->url_get->flags & GETOUT_URL))
1576 config->url_get = config->url_get->next;
1581 if(config->url_get)
1583 url = config->url_get;
1586 config->url_get = url = new_getout(config);
1600 config->ftp_ssl = toggle;
1601 if(config->ftp_ssl)
1607 Curl_safefree(config->ftpport);
1612 err = getstr(&config->proxy, nextarg, DENY_BLANK);
1613 config->proxyver = CURLPROXY_SOCKS5;
1616 err = getstr(&config->proxy, nextarg, DENY_BLANK);
1617 config->proxyver = CURLPROXY_SOCKS4;
1620 err = getstr(&config->proxy, nextarg, DENY_BLANK);
1621 config->proxyver = CURLPROXY_SOCKS4A;
1624 err = getstr(&config->proxy, nextarg, DENY_BLANK);
1625 config->proxyver = CURLPROXY_SOCKS5_HOSTNAME;
1628 config->tcp_nodelay = toggle;
1631 config->proxydigest = toggle;
1634 config->proxybasic = toggle;
1637 err = str2unum(&config->req_retry, nextarg);
1640 config->retry_connrefused = toggle;
1643 err = str2unummax(&config->retry_delay, nextarg, LONG_MAX/1000);
1646 err = str2unummax(&config->retry_maxtime, nextarg, LONG_MAX/1000);
1649 config->retry_all_errors = toggle;
1655 config->proxynegotiate = toggle;
1658 config->mime_options &= ~CURLMIMEOPT_FORMESCAPE;
1660 config->mime_options |= CURLMIMEOPT_FORMESCAPE;
1663 err = getstr(&config->ftp_account, nextarg, DENY_BLANK);
1666 config->proxyanyauth = toggle;
1672 config->ignorecl = toggle;
1675 config->ftp_skip_ip = toggle;
1678 config->ftp_filemethod = ftpfilemethod(config, nextarg);
1695 err = str2unum(&config->localport, nextarg);
1696 if(err || (config->localport > 65535)) {
1701 config->localportrange = 1; /* default number of ports to try */
1703 err = str2unum(&config->localportrange, lrange);
1704 if(err || (config->localportrange > 65535))
1707 config->localportrange -= (config->localport-1);
1708 if(config->localportrange < 1)
1715 err = getstr(&config->ftp_alternative_to_user, nextarg, DENY_BLANK);
1723 config->ftp_ssl_reqd = toggle;
1726 config->disable_sessionid = (!toggle)?TRUE:FALSE;
1732 config->ftp_ssl_control = toggle;
1735 config->ftp_ssl_ccc = toggle;
1736 if(!config->ftp_ssl_ccc_mode)
1737 config->ftp_ssl_ccc_mode = CURLFTPSSL_CCC_PASSIVE;
1740 config->ftp_ssl_ccc = TRUE;
1741 config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg);
1753 config->raw = toggle;
1756 config->nokeepalive = (!toggle)?TRUE:FALSE;
1759 err = str2unum(&config->alivetime, nextarg);
1762 config->post301 = toggle;
1765 config->post302 = toggle;
1768 config->post303 = toggle;
1772 err = getstr(&config->noproxy, nextarg, ALLOW_BLANK);
1775 config->socks5_gssapi_nec = toggle;
1779 err = getstr(&config->proxy, nextarg, DENY_BLANK);
1780 config->proxyver = CURLPROXY_HTTP_1_0;
1783 err = str2unum(&config->tftp_blksize, nextarg);
1786 err = getstr(&config->mail_from, nextarg, DENY_BLANK);
1790 err = add2list(&config->mail_rcpt, nextarg);
1793 config->ftp_pret = toggle;
1796 config->proto_present = TRUE;
1797 err = proto2num(config, built_in_protos, &config->proto_str, nextarg);
1800 config->proto_redir_present = TRUE;
1801 if(proto2num(config, redir_protos, &config->proto_redir_str,
1806 err = add2list(&config->resolve, nextarg);
1809 config->gssapi_delegation = delegation(config, nextarg);
1812 err = getstr(&config->mail_auth, nextarg, DENY_BLANK);
1819 err = getstr(&config->sasl_authzid, nextarg, DENY_BLANK);
1822 config->sasl_ir = toggle;
1832 config->abstract_unix_socket = FALSE;
1833 err = getstr(&config->unix_socket_path, nextarg, DENY_BLANK);
1836 config->path_as_is = toggle;
1839 err = getstr(&config->proxy_service_name, nextarg, DENY_BLANK);
1842 err = getstr(&config->service_name, nextarg, DENY_BLANK);
1845 err = getstr(&config->proto_default, nextarg, DENY_BLANK);
1847 err = check_protocol(config->proto_default);
1850 err = secs2ms(&config->expect100timeout_ms, nextarg);
1853 config->tftp_no_options = toggle;
1856 err = add2list(&config->connect_to, nextarg);
1859 config->abstract_unix_socket = TRUE;
1860 err = getstr(&config->unix_socket_path, nextarg, DENY_BLANK);
1863 err = str2tls_max(&config->ssl_version_max, nextarg);
1866 config->suppress_connect_headers = toggle;
1869 config->ssh_compression = toggle;
1872 err = str2unum(&config->happy_eyeballs_timeout_ms, nextarg);
1878 case C_TRACE_CONFIG: /* --trace-config */
1896 sethttpver(global, config, CURL_HTTP_VERSION_1_0);
1900 sethttpver(global, config, CURL_HTTP_VERSION_1_1);
1906 sethttpver(global, config, CURL_HTTP_VERSION_2_0);
1912 sethttpver(global, config, CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
1919 sethttpver(global, config, CURL_HTTP_VERSION_3);
1926 sethttpver(global, config, CURL_HTTP_VERSION_3ONLY);
1930 config->http09_allowed = toggle;
1936 config->proxyver = CURLPROXY_HTTPS2;
1939 config->ssl_version = CURL_SSLVERSION_TLSv1;
1942 config->ssl_version = CURL_SSLVERSION_TLSv1_0;
1945 config->ssl_version = CURL_SSLVERSION_TLSv1_1;
1948 config->ssl_version = CURL_SSLVERSION_TLSv1_2;
1951 config->ssl_version = CURL_SSLVERSION_TLSv1_3;
1954 err = getstr(&config->cipher13_list, nextarg, DENY_BLANK);
1957 err = getstr(&config->proxy_cipher13_list, nextarg, DENY_BLANK);
1966 config->ip_version = CURL_IPRESOLVE_V4;
1969 config->ip_version = CURL_IPRESOLVE_V6;
1973 config->ftp_append = toggle;
1976 err = getstr(&config->useragent, nextarg, ALLOW_BLANK);
1982 err = getstr(&config->altsvc, nextarg, ALLOW_BLANK);
1988 err = getstr(&config->hsts, nextarg, ALLOW_BLANK);
1993 err = add2list(&config->cookies, nextarg);
1998 err = add2list(&config->cookiefiles, nextarg);
2002 config->use_ascii = toggle;
2005 err = getstr(&config->cookiejar, nextarg, DENY_BLANK);
2010 err = str2offset(&config->resume_from, nextarg);
2011 config->resume_from_current = FALSE;
2014 config->resume_from_current = TRUE;
2015 config->resume_from = 0;
2017 config->use_resume = TRUE;
2025 err = set_data(cmd, nextarg, global, config);
2028 err = url_query(nextarg, global, config);
2031 err = getstr(&config->headerfile, nextarg, DENY_BLANK);
2038 config->autoreferer = TRUE;
2042 config->autoreferer = FALSE;
2044 err = getstr(&config->referer, ptr, ALLOW_BLANK);
2049 GetFileAndPassword(nextarg, &config->cert, &config->key_passwd);
2052 err = getstr(&config->cacert, nextarg, DENY_BLANK);
2055 config->native_ca_store = toggle;
2058 config->proxy_native_ca_store = toggle;
2061 err = getstr(&config->cert_type, nextarg, DENY_BLANK);
2064 err = getstr(&config->key, nextarg, DENY_BLANK);
2067 err = getstr(&config->key_type, nextarg, DENY_BLANK);
2070 err = getstr(&config->key_passwd, nextarg, DENY_BLANK);
2074 err = getstr(&config->engine, nextarg, DENY_BLANK);
2076 config->engine && !strcmp(config->engine, "list")) {
2081 err = getstr(&config->capath, nextarg, DENY_BLANK);
2084 err = getstr(&config->pubkey, nextarg, DENY_BLANK);
2087 err = getstr(&config->hostpubmd5, nextarg, DENY_BLANK);
2089 if(!config->hostpubmd5 || strlen(config->hostpubmd5) != 32)
2094 err = getstr(&config->hostpubsha256, nextarg, DENY_BLANK);
2097 err = getstr(&config->crlfile, nextarg, DENY_BLANK);
2103 err = getstr(&config->tls_username, nextarg, DENY_BLANK);
2110 err = getstr(&config->tls_password, nextarg, ALLOW_BLANK);
2117 err = getstr(&config->tls_authtype, nextarg, DENY_BLANK);
2118 if(!err && strcmp(config->tls_authtype, "SRP"))
2124 config->ssl_allow_beast = toggle;
2128 config->ssl_auto_client_cert = toggle;
2132 config->proxy_ssl_auto_client_cert = toggle;
2135 err = getstr(&config->pinnedpubkey, nextarg, DENY_BLANK);
2138 err = getstr(&config->proxy_pinnedpubkey, nextarg, DENY_BLANK);
2141 config->verifystatus = TRUE;
2144 config->doh_verifystatus = TRUE;
2147 config->falsestart = TRUE;
2151 config->ssl_no_revoke = TRUE;
2155 config->ssl_revoke_best_effort = TRUE;
2158 config->tcp_fastopen = TRUE;
2165 err = getstr(&config->proxy_tls_username, nextarg, ALLOW_BLANK);
2172 err = getstr(&config->proxy_tls_password, nextarg, DENY_BLANK);
2178 err = getstr(&config->proxy_tls_authtype, nextarg, DENY_BLANK);
2179 if(!err && strcmp(config->proxy_tls_authtype, "SRP"))
2185 GetFileAndPassword(nextarg, &config->proxy_cert,
2186 &config->proxy_key_passwd);
2189 err = getstr(&config->proxy_cert_type, nextarg, DENY_BLANK);
2192 err = getstr(&config->proxy_key, nextarg, ALLOW_BLANK);
2195 err = getstr(&config->proxy_key_type, nextarg, DENY_BLANK);
2198 err = getstr(&config->proxy_key_passwd, nextarg, ALLOW_BLANK);
2202 err = getstr(&config->proxy_cipher_list, nextarg, DENY_BLANK);
2205 err = getstr(&config->proxy_crlfile, nextarg, DENY_BLANK);
2209 config->proxy_ssl_allow_beast = toggle;
2212 err = getstr(&config->login_options, nextarg, ALLOW_BLANK);
2215 err = getstr(&config->proxy_cacert, nextarg, DENY_BLANK);
2218 err = getstr(&config->proxy_capath, nextarg, DENY_BLANK);
2221 config->proxy_insecure_ok = toggle;
2225 config->proxy_ssl_version = CURL_SSLVERSION_TLSv1;
2229 config->socks5_auth |= CURLAUTH_BASIC;
2231 config->socks5_auth &= ~CURLAUTH_BASIC;
2235 config->socks5_auth |= CURLAUTH_GSSAPI;
2237 config->socks5_auth &= ~CURLAUTH_GSSAPI;
2240 err = getstr(&config->etag_save_file, nextarg, DENY_BLANK);
2243 err = getstr(&config->etag_compare_file, nextarg, DENY_BLANK);
2246 err = getstr(&config->ssl_ec_curves, nextarg, DENY_BLANK);
2255 config->mail_rcpt_allowfails = toggle;
2258 config->failwithbody = toggle;
2259 if(config->failonerror && config->failwithbody) {
2260 errorf(config->global, "You must select either --fail or "
2266 config->rm_partial = toggle;
2269 config->failonerror = toggle;
2270 if(config->failonerror && config->failwithbody) {
2271 errorf(config->global, "You must select either --fail or "
2280 if(formparse(config,
2282 &config->mimeroot,
2283 &config->mimecurrent,
2286 else if(SetHTTPrequest(config, HTTPREQ_MIMEPOST, &config->httpreq))
2290 config->globoff = toggle;
2293 config->use_httpget = toggle;
2296 err = getstr(&config->request_target, nextarg, DENY_BLANK);
2332 err = add2list(&config->proxyheaders, h);
2334 err = add2list(&config->headers, h);
2347 err = add2list(&config->proxyheaders, nextarg);
2349 err = add2list(&config->headers, nextarg);
2353 config->show_headers = toggle; /* show the headers as well in the
2357 config->cookiesession = toggle;
2360 config->no_body = toggle;
2361 config->show_headers = toggle;
2362 if(SetHTTPrequest(config,
2363 (config->no_body)?HTTPREQ_HEAD:HTTPREQ_GET,
2364 &config->httpreq))
2368 config->content_disposition = toggle;
2371 config->insecure_ok = toggle;
2374 config->doh_insecure_ok = toggle;
2376 case C_CONFIG: /* --config */
2378 errorf(global, "cannot read config from '%s'", nextarg);
2383 config->dirlistonly = toggle; /* only list the names of the FTP dir */
2388 config->unrestricted_auth = toggle;
2391 config->followlocation = toggle; /* Follow Location: HTTP headers */
2395 err = secs2ms(&config->timeout_ms, nextarg);
2407 config->netrc_opt = toggle;
2410 err = getstr(&config->netrc_file, nextarg, DENY_BLANK);
2415 config->netrc = toggle;
2420 config->nobuffer = longopt ? !toggle : TRUE;
2423 config->default_node_flags = toggle?GETOUT_USEREMOTE:0;
2426 err = getstr(&config->output_dir, nextarg, DENY_BLANK);
2429 config->file_clobber_mode = toggle ? CLOBBER_ALWAYS : CLOBBER_NEVER;
2434 if(!config->url_out)
2435 config->url_out = config->url_list;
2436 if(config->url_out) {
2439 while(config->url_out && (config->url_out->flags & GETOUT_OUTFILE))
2440 config->url_out = config->url_out->next;
2445 if(config->url_out)
2447 url = config->url_out;
2449 if(!toggle && !config->default_node_flags)
2452 config->url_out = url = new_getout(config);
2480 err = getstr(&config->ftpport, nextarg, DENY_BLANK);
2484 config->proxytunnel = toggle;
2497 err = add2list(&config->postquote, nextarg);
2502 err = add2list(&config->prequote, nextarg);
2505 err = add2list(&config->quote, nextarg);
2526 Curl_safefree(config->range);
2527 config->range = strdup(buffer);
2528 if(!config->range)
2545 err = getstr(&config->range, nextarg, DENY_BLANK);
2550 config->remote_time = toggle;
2560 err = add2list(&config->telnet_options, nextarg);
2564 if(!config->url_ul)
2565 config->url_ul = config->url_list;
2566 if(config->url_ul) {
2569 while(config->url_ul && (config->url_ul->flags & GETOUT_UPLOAD))
2570 config->url_ul = config->url_ul->next;
2575 if(config->url_ul)
2577 url = config->url_ul;
2580 config->url_ul = url = new_getout(config);
2597 err = getstr(&config->userpwd, nextarg, ALLOW_BLANK);
2602 err = getstr(&config->proxyuserpwd, nextarg, ALLOW_BLANK);
2648 Curl_safefree(config->writeout);
2649 err = file2string(&config->writeout, file);
2654 if(!config->writeout)
2658 err = getstr(&config->writeout, nextarg, DENY_BLANK);
2661 err = getstr(&config->preproxy, nextarg, DENY_BLANK);
2665 err = getstr(&config->proxy, nextarg, ALLOW_BLANK);
2666 if(config->proxyver != CURLPROXY_HTTPS2)
2667 config->proxyver = CURLPROXY_HTTP;
2671 err = getstr(&config->customrequest, nextarg, DENY_BLANK);
2675 err = str2unum(&config->low_speed_time, nextarg);
2676 if(!err && !config->low_speed_limit)
2677 config->low_speed_limit = 1;
2681 err = str2unum(&config->low_speed_limit, nextarg);
2682 if(!err && !config->low_speed_time)
2683 config->low_speed_time = 30;
2711 config->timecond = CURL_TIMECOND_IFMODSINCE;
2715 config->timecond = CURL_TIMECOND_IFUNMODSINCE;
2720 config->timecond = CURL_TIMECOND_LASTMOD;
2725 config->condtime = (curl_off_t)curl_getdate(nextarg, &now);
2726 if(-1 == config->condtime) {
2731 config->condtime = value;
2734 config->timecond = CURL_TIMECOND_NONE;
2763 struct OperationConfig *config = global->first;
2788 global, config);
2791 config = global->last;
2797 if(config->url_list && config->url_list->url) {
2798 /* Allocate the next config */
2799 config->next = malloc(sizeof(struct OperationConfig));
2800 if(config->next) {
2801 /* Initialise the newly created config */
2802 config_init(config->next);
2804 /* Set the global config pointer */
2805 config->next->global = global;
2807 /* Update the last config pointer */
2808 global->last = config->next;
2810 /* Move onto the new config */
2811 config->next->prev = config;
2812 config = config->next;
2830 result = getparameter("--url", orig_opt, argv[i], &used, global, config);
2837 if(!result && config->content_disposition) {
2838 if(config->show_headers)
2840 else if(config->resume_from_current)