• Home
  • Raw
  • Download

Lines Matching refs:config

192                            struct OperationConfig *config)  in operate_do()  argument
203 CURL *curl = config->easy; in operate_do()
220 heads.config = config; in operate_do()
229 if(!config->url_list || !config->url_list->url) { in operate_do()
245 if(!config->cacert && in operate_do()
246 !config->capath && in operate_do()
247 !config->insecure_ok) { in operate_do()
251 config->cacert = strdup(env); in operate_do()
252 if(!config->cacert) { in operate_do()
262 config->capath = strdup(env); in operate_do()
263 if(!config->capath) { in operate_do()
274 config->cacert = strdup(env); in operate_do()
275 if(!config->cacert) { in operate_do()
289 result = FindWin32CACert(config, "curl-ca-bundle.crt"); in operate_do()
296 if(config->postfields) { in operate_do()
297 if(config->use_httpget) { in operate_do()
299 httpgetfields = strdup(config->postfields); in operate_do()
300 Curl_safefree(config->postfields); in operate_do()
306 if(SetHTTPrequest(config, in operate_do()
307 (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET), in operate_do()
308 &config->httpreq)) { in operate_do()
314 if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) { in operate_do()
322 if(config->headerfile) { in operate_do()
324 if(strcmp(config->headerfile, "-")) { in operate_do()
325 FILE *newfile = fopen(config->headerfile, "wb"); in operate_do()
327 warnf(config->global, "Failed to open %s\n", config->headerfile); in operate_do()
332 heads.filename = config->headerfile; in operate_do()
350 for(urlnode = config->url_list; urlnode; urlnode = urlnode->next) { in operate_do()
369 mlfile_last = config->metalinkfile_list; in operate_do()
403 if(!config->globoff && infiles) { in operate_do()
453 if(!config->globoff) { in operate_do()
493 outs.config = config; in operate_do()
538 (metalink || !config->use_metalink)) { in operate_do()
550 if(!*outfile && !config->content_disposition) { in operate_do()
563 warnf(config->global, "bad output glob!\n"); in operate_do()
571 if(config->create_dirs || metalink) { in operate_do()
582 && config->content_disposition) { in operate_do()
587 if(config->resume_from_current) { in operate_do()
594 config->resume_from = fileinfo.st_size; in operate_do()
597 config->resume_from = 0; in operate_do()
600 if(config->resume_from) { in operate_do()
604 FILE *file = fopen(outfile, config->resume_from?"ab":"wb", in operate_do()
608 FILE *file = fopen(outfile, config->resume_from?"ab":"wb"); in operate_do()
617 outs.init = config->resume_from; in operate_do()
694 if(config->authtype & (1UL << bitcheck++)) { in operate_do()
707 if(config->proxyanyauth || (authbits>1)) { in operate_do()
708 warnf(config->global, in operate_do()
720 warnf(config->global, in operate_do()
725 if(uploadfile && config->resume_from_current) in operate_do()
726 config->resume_from = -1; /* -1 will then force get-it-yourself */ in operate_do()
789 if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) { in operate_do()
795 if(!config->tcp_nodelay) in operate_do()
798 if(config->tcp_fastopen) in operate_do()
804 if(metalink || !config->use_metalink) in operate_do()
816 input.config = config; in operate_do()
833 if(config->recvpersecond) in operate_do()
836 my_setopt(curl, CURLOPT_BUFFERSIZE, (long)config->recvpersecond); in operate_do()
843 if(config->no_body) { in operate_do()
850 else if(!config->use_metalink) in operate_do()
851 my_setopt(curl, CURLOPT_HEADER, config->include_headers?1L:0L); in operate_do()
853 if(config->oauth_bearer) in operate_do()
854 my_setopt_str(curl, CURLOPT_XOAUTH2_BEARER, config->oauth_bearer); in operate_do()
860 my_setopt_str(curl, CURLOPT_PROXY, config->proxy); in operate_do()
861 my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd); in operate_do()
864 my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L); in operate_do()
867 if(config->proxy) in operate_do()
868 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver); in operate_do()
871 if(config->socksproxy) { in operate_do()
872 my_setopt_str(curl, CURLOPT_SOCKS_PROXY, config->socksproxy); in operate_do()
874 (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_str(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_str(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()
959 if(config->httpversion) in operate_do()
960 my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion); in operate_do()
966 if(config->authtype) in operate_do()
967 my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype); in operate_do()
971 if(config->post301) in operate_do()
973 if(config->post302) in operate_do()
975 if(config->post303) in operate_do()
980 if(config->encoding) in operate_do()
984 if(config->tr_encoding) in operate_do()
989 my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport); in operate_do()
991 config->low_speed_limit); in operate_do()
992 my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time); in operate_do()
994 config->sendpersecond); in operate_do()
996 config->recvpersecond); in operate_do()
998 if(config->use_resume) in operate_do()
999 my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, config->resume_from); in operate_do()
1003 my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd); in operate_do()
1004 my_setopt_str(curl, CURLOPT_PROXY_KEYPASSWD, config->proxy_key_passwd); in operate_do()
1010 my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key); in operate_do()
1012 my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey); in operate_do()
1017 config->hostpubmd5); in operate_do()
1020 if(config->cacert) in operate_do()
1021 my_setopt_str(curl, CURLOPT_CAINFO, config->cacert); in operate_do()
1022 if(config->proxy_cacert) in operate_do()
1023 my_setopt_str(curl, CURLOPT_PROXY_CAINFO, config->proxy_cacert); in operate_do()
1024 if(config->capath) { in operate_do()
1025 result = res_setopt_str(curl, CURLOPT_CAPATH, config->capath); in operate_do()
1027 warnf(config->global, "ignoring %s, not supported by libcurl\n", in operate_do()
1034 if(config->proxy_capath) in operate_do()
1035 my_setopt_str(curl, CURLOPT_PROXY_CAPATH, config->proxy_capath); in operate_do()
1036 else if(config->capath) /* CURLOPT_PROXY_CAPATH default is capath */ in operate_do()
1037 my_setopt_str(curl, CURLOPT_PROXY_CAPATH, config->capath); in operate_do()
1039 if(config->crlfile) in operate_do()
1040 my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile); in operate_do()
1041 if(config->proxy_crlfile) in operate_do()
1042 my_setopt_str(curl, CURLOPT_PROXY_CRLFILE, config->proxy_crlfile); in operate_do()
1043 else if(config->crlfile) /* CURLOPT_PROXY_CRLFILE default is crlfile */ in operate_do()
1044 my_setopt_str(curl, CURLOPT_PROXY_CRLFILE, config->crlfile); in operate_do()
1046 if(config->pinnedpubkey) in operate_do()
1047 my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey); in operate_do()
1050 my_setopt_str(curl, CURLOPT_SSLCERT, config->cert); in operate_do()
1051 my_setopt_str(curl, CURLOPT_PROXY_SSLCERT, config->proxy_cert); in operate_do()
1052 my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type); in operate_do()
1054 config->proxy_cert_type); in operate_do()
1055 my_setopt_str(curl, CURLOPT_SSLKEY, config->key); in operate_do()
1056 my_setopt_str(curl, CURLOPT_PROXY_SSLKEY, config->proxy_key); in operate_do()
1057 my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type); in operate_do()
1059 config->proxy_key_type); in operate_do()
1061 if(config->insecure_ok) { in operate_do()
1070 if(config->proxy_insecure_ok) { in operate_do()
1078 if(config->verifystatus) in operate_do()
1081 if(config->falsestart) in operate_do()
1084 my_setopt_enum(curl, CURLOPT_SSLVERSION, config->ssl_version); in operate_do()
1086 config->proxy_ssl_version); in operate_do()
1088 if(config->path_as_is) in operate_do()
1092 if(!config->insecure_ok) { in operate_do()
1114 if(config->no_body || config->remote_time) { in operate_do()
1119 my_setopt(curl, CURLOPT_CRLF, config->crlf?1L:0L); in operate_do()
1120 my_setopt_slist(curl, CURLOPT_QUOTE, config->quote); in operate_do()
1121 my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote); in operate_do()
1122 my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote); in operate_do()
1125 if(config->cookie) in operate_do()
1126 my_setopt_str(curl, CURLOPT_COOKIE, config->cookie); in operate_do()
1128 if(config->cookiefile) in operate_do()
1129 my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile); in operate_do()
1132 if(config->cookiejar) in operate_do()
1133 my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar); in operate_do()
1136 my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession?1L:0L); in operate_do()
1138 if(config->cookie || config->cookiefile || config->cookiejar) { in operate_do()
1139 warnf(config->global, "cookie option(s) used even though cookie " in operate_do()
1145 my_setopt_enum(curl, CURLOPT_TIMECONDITION, (long)config->timecond); in operate_do()
1146 my_setopt(curl, CURLOPT_TIMEVALUE, (long)config->condtime); in operate_do()
1147 my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest); in operate_do()
1148 customrequest_helper(config, config->httpreq, config->customrequest); in operate_do()
1152 my_setopt_str(curl, CURLOPT_INTERFACE, config->iface); in operate_do()
1153 my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel); in operate_do()
1155 progressbarinit(&progressbar, config); in operate_do()
1165 if(config->dns_servers) in operate_do()
1166 my_setopt_str(curl, CURLOPT_DNS_SERVERS, config->dns_servers); in operate_do()
1169 if(config->dns_interface) in operate_do()
1170 my_setopt_str(curl, CURLOPT_DNS_INTERFACE, config->dns_interface); in operate_do()
1171 if(config->dns_ipv4_addr) in operate_do()
1172 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr); in operate_do()
1173 if(config->dns_ipv6_addr) in operate_do()
1174 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr); in operate_do()
1177 my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options); in operate_do()
1180 my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file); in operate_do()
1181 my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file); in operate_do()
1183 (long)(config->connecttimeout * 1000)); in operate_do()
1185 if(config->cipher_list) in operate_do()
1186 my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list); in operate_do()
1188 if(config->proxy_cipher_list) in operate_do()
1190 config->proxy_cipher_list); in operate_do()
1193 if(config->disable_epsv) in operate_do()
1198 if(config->disable_eprt) in operate_do()
1204 my_setopt(curl, CURLOPT_DEBUGDATA, config); in operate_do()
1209 if(config->engine) { in operate_do()
1210 result = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine); in operate_do()
1218 (long)(config->ftp_create_dirs? in operate_do()
1223 if(config->max_filesize) in operate_do()
1225 config->max_filesize); in operate_do()
1227 if(4 == config->ip_version) in operate_do()
1229 else if(6 == config->ip_version) in operate_do()
1235 if(config->ftp_ssl_reqd) in operate_do()
1239 else if(config->ftp_ssl) in operate_do()
1243 else if(config->ftp_ssl_control) in operate_do()
1247 if(config->ftp_ssl_ccc) in operate_do()
1249 (long)config->ftp_ssl_ccc_mode); in operate_do()
1252 if(config->socks5_gssapi_nec) in operate_do()
1254 config->socks5_gssapi_nec); in operate_do()
1257 if(config->proxy_service_name) in operate_do()
1259 config->proxy_service_name); in operate_do()
1262 if(config->service_name) in operate_do()
1264 config->service_name); in operate_do()
1267 my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account); in operate_do()
1269 my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L); in operate_do()
1272 my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L); in operate_do()
1275 my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod); in operate_do()
1278 if(config->localport) { in operate_do()
1279 my_setopt(curl, CURLOPT_LOCALPORT, (long)config->localport); in operate_do()
1281 (long)config->localportrange); in operate_do()
1286 config->ftp_alternative_to_user); in operate_do()
1289 if(config->disable_sessionid) in operate_do()
1294 if(config->raw) { in operate_do()
1300 if(!config->nokeepalive) { in operate_do()
1302 if(config->alivetime != 0) { in operate_do()
1303 my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime); in operate_do()
1304 my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime); in operate_do()
1311 if(config->tftp_blksize) in operate_do()
1312 my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize); in operate_do()
1314 if(config->mail_from) in operate_do()
1315 my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from); in operate_do()
1317 if(config->mail_rcpt) in operate_do()
1318 my_setopt_slist(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt); in operate_do()
1321 if(config->ftp_pret) in operate_do()
1324 if(config->proto_present) in operate_do()
1325 my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto); in operate_do()
1326 if(config->proto_redir_present) in operate_do()
1327 my_setopt_flags(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir); in operate_do()
1329 if(config->content_disposition in operate_do()
1341 if(config->resolve) in operate_do()
1343 my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve); in operate_do()
1345 if(config->connect_to) in operate_do()
1347 my_setopt_slist(curl, CURLOPT_CONNECT_TO, config->connect_to); in operate_do()
1351 if(config->tls_username) in operate_do()
1353 config->tls_username); in operate_do()
1354 if(config->tls_password) in operate_do()
1356 config->tls_password); in operate_do()
1357 if(config->tls_authtype) in operate_do()
1359 config->tls_authtype); in operate_do()
1360 if(config->proxy_tls_username) in operate_do()
1362 config->proxy_tls_username); in operate_do()
1363 if(config->proxy_tls_password) in operate_do()
1365 config->proxy_tls_password); in operate_do()
1366 if(config->proxy_tls_authtype) in operate_do()
1368 config->proxy_tls_authtype); in operate_do()
1372 if(config->gssapi_delegation) in operate_do()
1374 config->gssapi_delegation); in operate_do()
1378 long mask = (config->ssl_allow_beast ? CURLSSLOPT_ALLOW_BEAST : 0) | in operate_do()
1379 (config->ssl_no_revoke ? CURLSSLOPT_NO_REVOKE : 0); in operate_do()
1384 if(config->proxy_ssl_allow_beast) in operate_do()
1388 if(config->mail_auth) in operate_do()
1389 my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth); in operate_do()
1392 if(config->sasl_ir) in operate_do()
1395 if(config->nonpn) { in operate_do()
1399 if(config->noalpn) { in operate_do()
1404 if(config->unix_socket_path) in operate_do()
1406 config->unix_socket_path); in operate_do()
1409 if(config->proto_default) in operate_do()
1410 my_setopt_str(curl, CURLOPT_DEFAULT_PROTOCOL, config->proto_default); in operate_do()
1413 if(config->expect100timeout > 0) in operate_do()
1415 (long)(config->expect100timeout*1000)); in operate_do()
1418 if(config->tftp_no_options) in operate_do()
1422 retry_sleep_default = (config->retry_delay) ? in operate_do()
1423 config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */ in operate_do()
1425 retry_numretries = config->req_retry; in operate_do()
1439 if(!metalink && config->use_metalink) { in operate_do()
1448 fprintf(config->global->errors, in operate_do()
1452 fprintf(config->global->errors, in operate_do()
1458 if(config->test_event_based) in operate_do()
1483 (!config->retry_maxtime || in operate_do()
1485 config->retry_maxtime*1000L)) ) { in operate_do()
1501 else if(config->retry_connrefused && in operate_do()
1509 (config->failonerror && in operate_do()
1562 warnf(config->global, "Transient problem: %s " in operate_do()
1569 if(!config->retry_delay) { in operate_do()
1655 if(config->writeout) in operate_do()
1656 ourWriteOut(curl, &outs, config->writeout); in operate_do()
1658 if(config->writeenv) in operate_do()
1702 if(!result && config->xattr && outs.fopened && outs.stream) { in operate_do()
1705 warnf(config->global, "Error setting extended attributes: %s\n", in operate_do()
1739 if(!result && config->remote_time && outs.s_isreg && outs.filename) { in operate_do()
1753 if(!metalink && config->use_metalink && result == CURLE_OK) { in operate_do()
1754 int rv = parse_metalink(config, &outs, this_url); in operate_do()
1756 fprintf(config->global->errors, "Metalink: parsing (%s) OK\n", in operate_do()
1759 fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n", in operate_do()
1874 clean_getout(config); in operate_do()
1886 clean_metalink(config); in operate_do()
1891 CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[]) in operate() argument
1904 parseconfig(NULL, config); /* ignore possible failure */ in operate()
1907 if((argc < 2) && (!config->first->url_list)) { in operate()
1908 helpf(config->errors, NULL); in operate()
1915 ParameterError res = parse_args(config, argc, argv); in operate()
1930 tool_list_engines(config->easy); in operate()
1938 if(config->libcurl) { in operate()
1947 struct OperationConfig *operation = config->first; in operate()
1957 config->current = config->first; in operate()
1960 while(!result && config->current) { in operate()
1961 result = operate_do(config, config->current); in operate()
1963 config->current = config->current->next; in operate()
1967 if(config->libcurl) { in operate()
1972 dumpeasysrc(config); in operate()
1977 helpf(config->errors, "out of memory\n"); in operate()