• Home
  • Raw
  • Download

Lines Matching +full:resolve +full:- +full:url

21  * SPDX-License-Identifier: curl
56 #define TRC_IDS_FORMAT_IDS_1 "[%" CURL_FORMAT_CURL_OFF_T "-x] "
57 #define TRC_IDS_FORMAT_IDS_2 "[%" CURL_FORMAT_CURL_OFF_T "-%" \
93 for(i = 0; i < size - 1; i++) { in debug_cb()
98 (void)fwrite(data + st, i - st + 1, 1, output); in debug_cb()
105 (void)fwrite(data + st, i - st + 1, 1, output); in debug_cb()
107 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb()
115 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb()
141 fprintf(stderr, "something unexpected went wrong - bailing out!\n"); in err()
150 "usage: [options] url\n" in usage()
152 " -V http_version (http/1.1, h2, h3) http version to use\n" in usage()
173 if(curl_easy_getinfo(handle->h, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, in cb()
175 fprintf(stderr, "INFO: [%d] write, Content-Length %"CURL_FORMAT_CURL_OFF_T in cb()
176 "\n", handle->idx, totalsize); in cb()
178 if(!handle->resumed) { in cb()
179 ++handle->paused; in cb()
181 handle->idx, handle->paused, (long)realsize); in cb()
182 assert(handle->paused == 1); in cb()
185 if(handle->fail_write) { in cb()
186 ++handle->errored; in cb()
188 handle->idx, (long)realsize, handle->errored); in cb()
192 handle->idx, (long)realsize); in cb()
205 struct curl_slist *resolve = NULL; in main() local
207 char *url, *host = NULL, *port = NULL; in main() local
209 int resume_round = -1; in main()
213 while((ch = getopt(argc, argv, "hV:")) != -1) { in main()
236 argc -= optind; in main()
240 fprintf(stderr, "ERROR: need URL as argument\n"); in main()
243 url = argv[0]; in main()
253 if(curl_url_set(cu, CURLUPART_URL, url, 0)) { in main()
254 fprintf(stderr, "not a URL: '%s'\n", url); in main()
258 fprintf(stderr, "could not get host of '%s'\n", url); in main()
262 fprintf(stderr, "could not get port of '%s'\n", url); in main()
265 memset(&resolve, 0, sizeof(resolve)); in main()
266 curl_msnprintf(resolve_buf, sizeof(resolve_buf)-1, in main()
268 resolve = curl_slist_append(resolve, resolve_buf); in main()
286 curl_easy_setopt(handles[i].h, CURLOPT_RESOLVE, resolve) != CURLE_OK || in main()
288 curl_easy_setopt(handles[i].h, CURLOPT_URL, url) != CURLE_OK) { in main()
343 if(msg->msg == CURLMSG_DONE) { in main()
345 if(msg->easy_handle == handles[i].h) { in main()
348 "result %d - wtf?\n", i, handles[i].paused, in main()
349 handles[i].resumed, msg->data.result); in main()
389 curl_slist_free_all(resolve); in main()