Lines Matching refs:config

191                            struct OperationConfig *config)  in operate_do()  argument
202 CURL *curl = config->easy; in operate_do()
218 heads.config = config; in operate_do()
227 if(!config->url_list || !config->url_list->url) { in operate_do()
242 if(!config->cacert && in operate_do()
243 !config->capath && in operate_do()
244 !config->insecure_ok) { in operate_do()
248 config->cacert = strdup(env); in operate_do()
249 if(!config->cacert) { in operate_do()
259 config->capath = strdup(env); in operate_do()
260 if(!config->capath) { in operate_do()
270 config->cacert = strdup(env); in operate_do()
271 if(!config->cacert) { in operate_do()
285 result = FindWin32CACert(config, "curl-ca-bundle.crt"); in operate_do()
292 if(config->postfields) { in operate_do()
293 if(config->use_httpget) { in operate_do()
295 httpgetfields = strdup(config->postfields); in operate_do()
296 Curl_safefree(config->postfields); in operate_do()
302 if(SetHTTPrequest(config, in operate_do()
303 (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET), in operate_do()
304 &config->httpreq)) { in operate_do()
310 if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) { in operate_do()
318 if(config->headerfile) { in operate_do()
320 if(!curlx_strequal(config->headerfile, "-")) { in operate_do()
321 FILE *newfile = fopen(config->headerfile, "wb"); in operate_do()
323 warnf(config->global, "Failed to open %s\n", config->headerfile); in operate_do()
328 heads.filename = config->headerfile; in operate_do()
346 for(urlnode = config->url_list; urlnode; urlnode = urlnode->next) { in operate_do()
365 mlfile_last = config->metalinkfile_list; in operate_do()
399 if(!config->globoff && infiles) { in operate_do()
449 if(!config->globoff) { in operate_do()
489 outs.config = config; in operate_do()
534 (metalink || !config->use_metalink)) { in operate_do()
546 if(!*outfile && !config->content_disposition) { in operate_do()
568 warnf(config->global, "bad output glob!\n"); in operate_do()
576 if(config->create_dirs || metalink) { in operate_do()
587 && config->content_disposition) { in operate_do()
592 if(config->resume_from_current) { in operate_do()
599 config->resume_from = fileinfo.st_size; in operate_do()
602 config->resume_from = 0; in operate_do()
605 if(config->resume_from) { in operate_do()
609 FILE *file = fopen(outfile, config->resume_from?"ab":"wb", in operate_do()
613 FILE *file = fopen(outfile, config->resume_from?"ab":"wb"); in operate_do()
622 outs.init = config->resume_from; in operate_do()
699 if(config->authtype & (1UL << bitcheck++)) { in operate_do()
712 if(config->proxyanyauth || (authbits>1)) { in operate_do()
713 warnf(config->global, in operate_do()
725 warnf(config->global, in operate_do()
730 if(uploadfile && config->resume_from_current) in operate_do()
731 config->resume_from = -1; /* -1 will then force get-it-yourself */ in operate_do()
794 if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) { in operate_do()
800 if(config->tcp_nodelay) in operate_do()
805 if(metalink || !config->use_metalink) in operate_do()
817 input.config = config; in operate_do()
834 if(config->recvpersecond) in operate_do()
837 my_setopt(curl, CURLOPT_BUFFERSIZE, (long)config->recvpersecond); in operate_do()
844 if(config->no_body) { in operate_do()
851 else if(!config->use_metalink) in operate_do()
852 my_setopt(curl, CURLOPT_HEADER, config->include_headers?1L:0L); in operate_do()
854 if(config->xoauth2_bearer) in operate_do()
855 my_setopt_str(curl, CURLOPT_XOAUTH2_BEARER, config->xoauth2_bearer); in operate_do()
861 my_setopt_str(curl, CURLOPT_PROXY, config->proxy); in operate_do()
862 my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd); in operate_do()
865 my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L); in operate_do()
868 if(config->proxy) in operate_do()
869 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver); in operate_do()
872 if(config->socksproxy) { in operate_do()
873 my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy); in operate_do()
874 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->socksver); in operate_do()
878 if(config->proxyanyauth) in operate_do()
881 else if(config->proxynegotiate) in operate_do()
884 else if(config->proxyntlm) in operate_do()
887 else if(config->proxydigest) in operate_do()
890 else if(config->proxybasic) in operate_do()
895 my_setopt(curl, CURLOPT_NOPROXY, config->noproxy); in operate_do()
899 my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror?1L:0L); in operate_do()
901 my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly?1L:0L); in operate_do()
902 my_setopt(curl, CURLOPT_APPEND, config->ftp_append?1L:0L); in operate_do()
904 if(config->netrc_opt) in operate_do()
906 else if(config->netrc || config->netrc_file) in operate_do()
911 if(config->netrc_file) in operate_do()
912 my_setopt(curl, CURLOPT_NETRC_FILE, config->netrc_file); in operate_do()
914 my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii?1L:0L); in operate_do()
915 if(config->login_options) in operate_do()
916 my_setopt_str(curl, CURLOPT_LOGIN_OPTIONS, config->login_options); in operate_do()
917 my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd); in operate_do()
918 my_setopt_str(curl, CURLOPT_RANGE, config->range); in operate_do()
920 my_setopt(curl, CURLOPT_TIMEOUT_MS, (long)(config->timeout * 1000)); in operate_do()
927 config->followlocation?1L:0L); in operate_do()
929 config->unrestricted_auth?1L:0L); in operate_do()
931 switch(config->httpreq) { in operate_do()
934 config->postfields); in operate_do()
936 config->postfieldsize); in operate_do()
939 my_setopt_httppost(curl, CURLOPT_HTTPPOST, config->httppost); in operate_do()
945 my_setopt_str(curl, CURLOPT_REFERER, config->referer); in operate_do()
946 my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer?1L:0L); in operate_do()
947 my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent); in operate_do()
948 my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers); in operate_do()
951 if(config->proxyheaders) { in operate_do()
952 my_setopt_slist(curl, CURLOPT_PROXYHEADER, config->proxyheaders); in operate_do()
957 my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs); in operate_do()
960 if(config->httpversion) in operate_do()
961 my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion); in operate_do()
964 if(config->authtype) in operate_do()
965 my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype); in operate_do()
969 if(config->post301) in operate_do()
971 if(config->post302) in operate_do()
973 if(config->post303) in operate_do()
978 if(config->encoding) in operate_do()
982 if(config->tr_encoding) in operate_do()
987 my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport); in operate_do()
989 config->low_speed_limit); in operate_do()
990 my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time); in operate_do()
992 config->sendpersecond); in operate_do()
994 config->recvpersecond); in operate_do()
996 if(config->use_resume) in operate_do()
997 my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, config->resume_from); in operate_do()
1001 my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd); in operate_do()
1007 my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key); in operate_do()
1009 my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey); in operate_do()
1014 config->hostpubmd5); in operate_do()
1017 if(config->cacert) in operate_do()
1018 my_setopt_str(curl, CURLOPT_CAINFO, config->cacert); in operate_do()
1019 if(config->capath) in operate_do()
1020 my_setopt_str(curl, CURLOPT_CAPATH, config->capath); in operate_do()
1021 if(config->crlfile) in operate_do()
1022 my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile); in operate_do()
1024 if(config->pinnedpubkey) in operate_do()
1025 my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey); in operate_do()
1028 my_setopt_str(curl, CURLOPT_SSLCERT, config->cert); in operate_do()
1029 my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type); in operate_do()
1030 my_setopt_str(curl, CURLOPT_SSLKEY, config->key); in operate_do()
1031 my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type); in operate_do()
1033 if(config->insecure_ok) { in operate_do()
1043 if(config->verifystatus) in operate_do()
1046 if(config->falsestart) in operate_do()
1049 my_setopt_enum(curl, CURLOPT_SSLVERSION, config->ssl_version); in operate_do()
1051 if(config->path_as_is) in operate_do()
1055 if(!config->insecure_ok) { in operate_do()
1077 if(config->no_body || config->remote_time) { in operate_do()
1082 my_setopt(curl, CURLOPT_CRLF, config->crlf?1L:0L); in operate_do()
1083 my_setopt_slist(curl, CURLOPT_QUOTE, config->quote); in operate_do()
1084 my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote); in operate_do()
1085 my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote); in operate_do()
1088 if(config->cookie) in operate_do()
1089 my_setopt_str(curl, CURLOPT_COOKIE, config->cookie); in operate_do()
1091 if(config->cookiefile) in operate_do()
1092 my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile); in operate_do()
1095 if(config->cookiejar) in operate_do()
1096 my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar); in operate_do()
1099 my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession?1L:0L); in operate_do()
1101 if(config->cookie || config->cookiefile || config->cookiejar) { in operate_do()
1102 warnf(config->global, "cookie option(s) used even though cookie " in operate_do()
1108 my_setopt_enum(curl, CURLOPT_TIMECONDITION, (long)config->timecond); in operate_do()
1109 my_setopt(curl, CURLOPT_TIMEVALUE, (long)config->condtime); in operate_do()
1110 my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest); in operate_do()
1114 my_setopt_str(curl, CURLOPT_INTERFACE, config->iface); in operate_do()
1115 my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel); in operate_do()
1117 progressbarinit(&progressbar, config); in operate_do()
1127 if(config->dns_servers) in operate_do()
1128 my_setopt_str(curl, CURLOPT_DNS_SERVERS, config->dns_servers); in operate_do()
1131 if(config->dns_interface) in operate_do()
1132 my_setopt_str(curl, CURLOPT_DNS_INTERFACE, config->dns_interface); in operate_do()
1133 if(config->dns_ipv4_addr) in operate_do()
1134 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr); in operate_do()
1135 if(config->dns_ipv6_addr) in operate_do()
1136 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr); in operate_do()
1139 my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options); in operate_do()
1142 my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file); in operate_do()
1143 my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file); in operate_do()
1145 (long)(config->connecttimeout * 1000)); in operate_do()
1147 if(config->cipher_list) in operate_do()
1148 my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list); in operate_do()
1151 if(config->disable_epsv) in operate_do()
1156 if(config->disable_eprt) in operate_do()
1162 my_setopt(curl, CURLOPT_DEBUGDATA, config); in operate_do()
1167 if(config->engine) { in operate_do()
1168 result = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine); in operate_do()
1176 config->ftp_create_dirs?1L:0L); in operate_do()
1179 if(config->max_filesize) in operate_do()
1181 config->max_filesize); in operate_do()
1183 if(4 == config->ip_version) in operate_do()
1185 else if(6 == config->ip_version) in operate_do()
1191 if(config->ftp_ssl_reqd) in operate_do()
1195 else if(config->ftp_ssl) in operate_do()
1199 else if(config->ftp_ssl_control) in operate_do()
1203 if(config->ftp_ssl_ccc) in operate_do()
1205 (long)config->ftp_ssl_ccc_mode); in operate_do()
1212 if(config->socks5_gssapi_service) in operate_do()
1214 config->socks5_gssapi_service); in operate_do()
1217 if(config->socks5_gssapi_nec) in operate_do()
1219 config->socks5_gssapi_nec); in operate_do()
1222 if(config->proxy_service_name) in operate_do()
1224 config->proxy_service_name); in operate_do()
1227 if(config->service_name) in operate_do()
1229 config->service_name); in operate_do()
1234 my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account); in operate_do()
1236 my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L); in operate_do()
1239 my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L); in operate_do()
1242 my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod); in operate_do()
1245 if(config->localport) { in operate_do()
1246 my_setopt(curl, CURLOPT_LOCALPORT, (long)config->localport); in operate_do()
1248 (long)config->localportrange); in operate_do()
1253 config->ftp_alternative_to_user); in operate_do()
1256 if(config->disable_sessionid) in operate_do()
1261 if(config->raw) { in operate_do()
1267 if(!config->nokeepalive) { in operate_do()
1269 if(config->alivetime != 0) { in operate_do()
1271 warnf(config->global, "Keep-alive functionality somewhat crippled " in operate_do()
1274 my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime); in operate_do()
1275 my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime); in operate_do()
1282 if(config->tftp_blksize) in operate_do()
1283 my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize); in operate_do()
1285 if(config->mail_from) in operate_do()
1286 my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from); in operate_do()
1288 if(config->mail_rcpt) in operate_do()
1289 my_setopt_slist(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt); in operate_do()
1292 if(config->ftp_pret) in operate_do()
1295 if(config->proto_present) in operate_do()
1296 my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto); in operate_do()
1297 if(config->proto_redir_present) in operate_do()
1298 my_setopt_flags(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir); in operate_do()
1300 if(config->content_disposition in operate_do()
1314 if(config->resolve) in operate_do()
1316 my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve); in operate_do()
1320 if(config->tls_username) in operate_do()
1322 config->tls_username); in operate_do()
1323 if(config->tls_password) in operate_do()
1325 config->tls_password); in operate_do()
1326 if(config->tls_authtype) in operate_do()
1328 config->tls_authtype); in operate_do()
1332 if(config->gssapi_delegation) in operate_do()
1334 config->gssapi_delegation); in operate_do()
1337 if(config->ssl_allow_beast) in operate_do()
1340 if(config->mail_auth) in operate_do()
1341 my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth); in operate_do()
1344 if(config->sasl_ir) in operate_do()
1347 if(config->nonpn) { in operate_do()
1351 if(config->noalpn) { in operate_do()
1356 if(config->unix_socket_path) in operate_do()
1358 config->unix_socket_path); in operate_do()
1361 retry_sleep_default = (config->retry_delay) ? in operate_do()
1362 config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */ in operate_do()
1364 retry_numretries = config->req_retry; in operate_do()
1377 if(!metalink && config->use_metalink) { in operate_do()
1386 fprintf(config->global->errors, in operate_do()
1390 fprintf(config->global->errors, in operate_do()
1396 if(config->test_event_based) in operate_do()
1421 (!config->retry_maxtime || in operate_do()
1423 config->retry_maxtime*1000L)) ) { in operate_do()
1439 (config->failonerror && in operate_do()
1488 warnf(config->global, "Transient problem: %s " in operate_do()
1495 if(!config->retry_delay) { in operate_do()
1581 if(config->writeout) in operate_do()
1582 ourWriteOut(curl, &outs, config->writeout); in operate_do()
1584 if(config->writeenv) in operate_do()
1628 if(!result && config->xattr && outs.fopened && outs.stream) { in operate_do()
1631 warnf(config->global, "Error setting extended attributes: %s\n", in operate_do()
1665 if(!result && config->remote_time && outs.s_isreg && outs.filename) { in operate_do()
1679 if(!metalink && config->use_metalink && result == CURLE_OK) { in operate_do()
1680 int rv = parse_metalink(config, &outs, this_url); in operate_do()
1682 fprintf(config->global->errors, "Metalink: parsing (%s) OK\n", in operate_do()
1685 fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n", in operate_do()
1800 clean_getout(config); in operate_do()
1812 clean_metalink(config); in operate_do()
1817 CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[]) in operate() argument
1828 parseconfig(NULL, config); /* ignore possible failure */ in operate()
1831 if((argc < 2) && (!config->first->url_list)) { in operate()
1832 helpf(config->errors, NULL); in operate()
1839 ParameterError res = parse_args(config, argc, argv); in operate()
1854 tool_list_engines(config->easy); in operate()
1867 struct OperationConfig *operation = config->first; in operate()
1877 config->current = config->first; in operate()
1880 while(!result && config->current) { in operate()
1881 result = operate_do(config, config->current); in operate()
1883 config->current = config->current->next; in operate()
1891 dumpeasysrc(config); in operate()
1895 helpf(config->errors, "out of memory\n"); in operate()