• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:config

8  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
92 #define CURLseparator "--_curl_--"
106 " using the --cacert option.\n"
114 " the -k (or --insecure) option.\n"
180 switch(stat_buf->st_fab_rfm) { in VmsSpecialSize()
186 return stat_buf->st_size; in VmsSpecialSize()
192 struct OperationConfig *config) in operate_do() argument
203 CURL *curl = config->easy; in operate_do()
211 bool orig_noprogress = global->noprogress; in operate_do()
212 bool orig_isatty = global->isatty; in operate_do()
220 heads.config = config; in operate_do()
229 if(!config->url_list || !config->url_list->url) { in operate_do()
230 helpf(global->errors, "no URL specified!\n"); in operate_do()
235 /* On WIN32 we can't set the path to curl-ca-bundle.crt in operate_do()
241 * We support the environment variable thing for non-Windows platforms 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()
254 helpf(global->errors, "out of memory\n"); in operate_do()
262 config->capath = strdup(env); in operate_do()
263 if(!config->capath) { in operate_do()
265 helpf(global->errors, "out of memory\n"); in operate_do()
274 config->cacert = strdup(env); in operate_do()
275 if(!config->cacert) { in operate_do()
277 helpf(global->errors, "out of memory\n"); 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()
302 helpf(global->errors, "out of memory\n"); 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()
366 if(urlnode->flags & GETOUT_METALINK) { in operate_do()
369 mlfile_last = config->metalinkfile_list; in operate_do()
372 mlfile_last = mlfile_last->next; in operate_do()
373 mlres = mlfile->resource; in operate_do()
380 /* urlnode->url is the full URL (it might be NULL) */ in operate_do()
382 if(!urlnode->url) { in operate_do()
385 Curl_safefree(urlnode->outfile); in operate_do()
386 Curl_safefree(urlnode->infile); in operate_do()
387 urlnode->flags = 0; in operate_do()
392 if(urlnode->outfile) { in operate_do()
393 outfiles = strdup(urlnode->outfile); in operate_do()
395 helpf(global->errors, "out of memory\n"); in operate_do()
401 infiles = urlnode->infile; in operate_do()
403 if(!config->globoff && infiles) { in operate_do()
406 global->showerror?global->errors:NULL); in operate_do()
432 helpf(global->errors, "out of memory\n"); in operate_do()
437 helpf(global->errors, "out of memory\n"); in operate_do()
453 if(!config->globoff) { in operate_do()
456 result = glob_url(&urls, urlnode->url, &urlnum, in operate_do()
457 global->showerror?global->errors:NULL); in operate_do()
467 separator= ((!outfiles || !strcmp(outfiles, "-")) && urlnum > 1); in operate_do()
488 uploadfilesize = -1; /* -1 means unknown */ in operate_do()
493 outs.config = config; in operate_do()
498 outfile = strdup(mlfile->filename); in operate_do()
503 this_url = strdup(mlres->url); in operate_do()
516 this_url = strdup(urlnode->url); in operate_do()
536 if(((urlnode->flags&GETOUT_USEREMOTE) || in operate_do()
537 (outfile && strcmp("-", outfile))) && in operate_do()
538 (metalink || !config->use_metalink)) { in operate_do()
550 if(!*outfile && !config->content_disposition) { in operate_do()
551 helpf(global->errors, "Remote file name has no length!\n"); in operate_do()
563 warnf(config->global, "bad output glob!\n"); in operate_do()
568 /* Create the directory hierarchy, if not pre-existent to a multiple in operate_do()
571 if(config->create_dirs || metalink) { in operate_do()
572 result = create_dir_hierarchy(outfile, global->errors); in operate_do()
581 if((urlnode->flags & GETOUT_USEREMOTE) in operate_do()
582 && config->content_disposition) { in operate_do()
587 if(config->resume_from_current) { in operate_do()
591 /* VMS -- Danger, the filesize is only valid for stream files */ 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()
611 helpf(global->errors, "Can't open '%s'!\n", outfile); in operate_do()
617 outs.init = config->resume_from; in operate_do()
628 * We have specified a file to upload and it isn't "-". in operate_do()
643 * - Stat gives a size but this is UNRELIABLE in VMS As a f.e. a in operate_do()
653 infd = -1; in operate_do()
667 if(infd == -1) in operate_do()
670 if((infd == -1) || fstat(infd, &fileinfo)) in operate_do()
673 helpf(global->errors, "Can't open '%s'!\n", uploadfile); in operate_do()
674 if(infd != -1) { in operate_do()
694 if(config->authtype & (1UL << bitcheck++)) { in operate_do()
704 * If the user has also selected --anyauth or --proxy-anyauth in operate_do()
707 if(config->proxyanyauth || (authbits>1)) { in operate_do()
708 warnf(config->global, in operate_do()
709 "Using --anyauth or --proxy-anyauth with upload from stdin" 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()
732 global->noprogress = global->isatty = TRUE; in operate_do()
734 /* progress meter is per download, so restore config in operate_do()
736 global->noprogress = orig_noprogress; in operate_do()
737 global->isatty = orig_isatty; in operate_do()
740 if(urlnum > 1 && !global->mute) { in operate_do()
741 fprintf(global->errors, "\n[%lu/%lu]: %s --> %s\n", in operate_do()
772 /* Append / before the ? to create a well-formed url in operate_do()
786 if(!global->errors) in operate_do()
787 global->errors = stderr; 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()
839 if(uploadfilesize != -1) in operate_do()
842 my_setopt(curl, CURLOPT_NOPROGRESS, global->noprogress?1L:0L); in operate_do()
843 if(config->no_body) { in operate_do()
847 /* If --metalink is used, we ignore --include (headers in 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()
858 /* TODO: Make this a run-time check instead of compile-time one. */ 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()
961 else if(curlinfo->features & CURL_VERSION_HTTP2) { 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()
1008 /* SSH and SSL private key uses same command-line option */ 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()
1029 "SSL_CERT_DIR environment variable":"--capath"); 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()
1049 if(curlinfo->features & CURL_VERSION_SSL) { 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()
1067 /* libcurl default is strict verifyhost -> 2L */ 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()
1149 my_setopt(curl, CURLOPT_STDERR, global->errors); 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()
1156 if((global->progressmode == CURL_PROGRESS_BAR) && in operate_do()
1157 !global->noprogress && !global->mute) { 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()
1202 if(global->tracetype != TRACE_NONE) { 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()
1330 && (urlnode->flags & GETOUT_USEREMOTE)) 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()
1350 if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP) { 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()
1430 if(global->libcurl) { in operate_do()
1439 if(!metalink && config->use_metalink) { in operate_do()
1440 /* If outs.metalink_parser is non-NULL, delete it first. */ in operate_do()
1448 fprintf(config->global->errors, in operate_do()
1452 fprintf(config->global->errors, in operate_do()
1454 mlfile->filename, this_url); in operate_do()
1458 if(config->test_event_based) in operate_do()
1476 if(outs.is_cd_filename && outs.stream && !global->mute && in operate_do()
1480 /* if retry-max-time is non-zero, make sure we haven't exceeded the 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()
1530 * or close/re-open the file so that the next attempt starts in operate_do()
1562 warnf(config->global, "Transient problem: %s " in operate_do()
1568 retry_numretries--; in operate_do()
1569 if(!config->retry_delay) { in operate_do()
1577 if(!global->mute) in operate_do()
1578 fprintf(global->errors, "Throwing away %" in operate_do()
1587 if(!global->mute) in operate_do()
1588 fprintf(global->errors, in operate_do()
1594 just truncated the file in a large file-safe way */ in operate_do()
1599 work properly with large files on 32-bit systems, but in operate_do()
1624 fprintf(global->errors, in operate_do()
1627 mlfile->filename, this_url, response); in operate_do()
1633 fprintf(global->errors, in operate_do()
1635 mlfile->filename, this_url, in operate_do()
1641 fprintf(global->errors, "Metalink: fetching (%s) from (%s) OK\n", in operate_do()
1642 mlfile->filename, this_url); in operate_do()
1649 if((global->progressmode == CURL_PROGRESS_BAR) && 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()
1673 if(!global->showerror) in operate_do()
1678 if(result && global->showerror) { in operate_do()
1679 fprintf(global->errors, "curl: (%d) %s\n", result, (errorbuffer[0]) ? in operate_do()
1682 fprintf(global->errors, "%s%s", 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()
1715 fprintf(global->errors, "(%d) Failed writing body\n", result); in operate_do()
1724 fprintf(global->errors, "(%d) Failed writing body\n", result); in operate_do()
1739 if(!result && config->remote_time && outs.s_isreg && outs.filename) { in operate_do()
1741 long filetime = -1; 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()
1758 else if(rv == -1) in operate_do()
1759 fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n", in operate_do()
1780 /* Free loop-local allocated memory and close loop-local opened fd */ in operate_do()
1795 mlres = mlres->next; in operate_do()
1814 /* Free loop-local allocated memory */ in operate_do()
1835 /* Free loop-local allocated memory */ in operate_do()
1847 Curl_safefree(urlnode->url); in operate_do()
1848 Curl_safefree(urlnode->outfile); in operate_do()
1849 Curl_safefree(urlnode->infile); in operate_do()
1850 urlnode->flags = 0; in operate_do()
1853 ** Bail out upon critical errors or --fail-early in operate_do()
1855 if(is_fatal_error(result) || (result && global->fail_early)) in operate_do()
1858 } /* for-loop through all URLs */ in operate_do()
1866 /* Reset the global config variables */ in operate_do()
1867 global->noprogress = orig_noprogress; in operate_do()
1868 global->isatty = orig_isatty; in operate_do()
1870 /* Free function-local referenced allocated memory */ in operate_do()
1874 clean_getout(config); in operate_do()
1878 /* Close function-local opened file descriptors */ 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
1902 (!curl_strequal(argv[1], "-q") && in operate()
1903 !curl_strequal(argv[1], "--disable"))) { in operate()
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()
1953 operation = operation->next; 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()