Made sure to pass longs in to curl_easy_setopt where necessary in the
libtest code.
This commit is contained in:
		| @@ -27,7 +27,7 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -28,7 +28,7 @@ int test(char *URL) | ||||
|     return TEST_ERR_MAJOR_BAD; | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -52,8 +52,8 @@ int test(char *URL) | ||||
|   curl_easy_setopt(c, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(c, CURLOPT_USERPWD, "test:ing"); | ||||
|   curl_easy_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing"); | ||||
|   curl_easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1); | ||||
|   curl_easy_setopt(c, CURLOPT_HEADER, 1); | ||||
|   curl_easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1L); | ||||
|   curl_easy_setopt(c, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   if ((m = curl_multi_init()) == NULL) { | ||||
|     fprintf(stderr, "curl_multi_init() failed\n"); | ||||
|   | ||||
| @@ -55,7 +55,7 @@ int test(char *URL) | ||||
|      proxy port */ | ||||
|   curl_easy_setopt(c, CURLOPT_PROXY, libtest_arg2); | ||||
|   curl_easy_setopt(c, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(c, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(c, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   if ((m = curl_multi_init()) == NULL) { | ||||
|     fprintf(stderr, "curl_multi_init() failed\n"); | ||||
|   | ||||
| @@ -116,10 +116,10 @@ int test(char *URL) | ||||
|   headerlist = hl; | ||||
|  | ||||
|   /* enable uploading */ | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); | ||||
|  | ||||
|   /* enable verbose */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* specify target */ | ||||
|   curl_easy_setopt(curl,CURLOPT_URL, URL); | ||||
|   | ||||
| @@ -106,7 +106,7 @@ static void *fire(void *ptr) | ||||
|   } | ||||
|  | ||||
|   headers = sethost(NULL); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE,    1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE,    1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); | ||||
|   curl_easy_setopt(curl, CURLOPT_URL,        tdata->url); | ||||
|   printf( "CURLOPT_SHARE\n" ); | ||||
|   | ||||
| @@ -59,7 +59,7 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|  | ||||
|   /* Now specify we want to POST data */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|  | ||||
|   /* Set the expected POST size */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft); | ||||
| @@ -71,10 +71,10 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_INFILE, &pooh); | ||||
|  | ||||
|   /* get verbose debug output please */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* include headers in the output */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   /* Perform the request, res will get the return code */ | ||||
|   res = curl_easy_perform(curl); | ||||
|   | ||||
| @@ -74,7 +74,7 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|  | ||||
|   /* Now specify we want to POST data */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|  | ||||
|   /* we want to use our own read function */ | ||||
|   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); | ||||
| @@ -83,10 +83,10 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_INFILE, &pooh); | ||||
|  | ||||
|   /* get verbose debug output please */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* include headers in the output */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   /* enforce chunked transfer by setting the header */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist); | ||||
|   | ||||
| @@ -27,9 +27,9 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_FILETIME, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_NOBODY, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -26,8 +26,8 @@ int test(char *URL) | ||||
|     curl = curl_easy_init(); | ||||
|     if(curl) { | ||||
|  | ||||
|       curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|       curl_easy_setopt(curl, CURLOPT_HEADER, 1); | ||||
|       curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|       curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|       curl2 = curl_easy_duphandle(curl); | ||||
|       if(curl2) { | ||||
|   | ||||
| @@ -39,10 +39,10 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|  | ||||
|   /* Now specify we want to POST data */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|  | ||||
|   /* Set the expected POST size */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 1L); | ||||
|  | ||||
|   /* we want to use our own read function */ | ||||
|   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); | ||||
| @@ -51,10 +51,10 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_INFILE, NULL); | ||||
|  | ||||
|   /* get verbose debug output please */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* include headers in the output */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   /* Perform the request, res will get the return code */ | ||||
|   res = curl_easy_perform(curl); | ||||
|   | ||||
| @@ -39,16 +39,16 @@ int test(char *URL) | ||||
|   */ | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "moo"); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 3); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 3L); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|  | ||||
|   /* this is where transfer 1 would take place, but skip that and change | ||||
|      options right away instead */ | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_NOBODY, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ | ||||
|  | ||||
|   /* Now, we should be making a fine HEAD request */ | ||||
|  | ||||
|   | ||||
| @@ -29,9 +29,9 @@ int test(char *URL) | ||||
|   /* First set the URL that is about to receive our POST. */ | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ | ||||
|  | ||||
|   /* Now, we should be making a zero byte POST request */ | ||||
|   res = curl_easy_perform(curl); | ||||
|   | ||||
| @@ -29,8 +29,8 @@ int test(char *URL) | ||||
|   /* First set the URL that is about to receive our POST. */ | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_HTTPPOST, NULL); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ | ||||
|  | ||||
|   /* Now, we should be making a zero byte POST request */ | ||||
|   res = curl_easy_perform(curl); | ||||
|   | ||||
| @@ -483,7 +483,7 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -28,8 +28,8 @@ int test(char *URL) | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_USERPWD, "monster:underbed"); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* get first page */ | ||||
|   res = curl_easy_perform(curl); | ||||
|   | ||||
| @@ -27,8 +27,8 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_FILETIME, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -29,7 +29,7 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_PORT, atoi(libtest_arg2)); | ||||
|   curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -28,9 +28,9 @@ int test(char *URL) | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_PORT, 19999); | ||||
|   curl_easy_setopt(curl, CURLOPT_PORT, 19999L); | ||||
|   curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -27,8 +27,8 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -71,13 +71,13 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   /* enable uploading */ | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); | ||||
|  | ||||
|   /* specify target */ | ||||
|   curl_easy_setopt(curl,CURLOPT_URL, URL); | ||||
|  | ||||
|   /* go verbose */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* use active FTP */ | ||||
|   curl_easy_setopt(curl, CURLOPT_FTPPORT, "-"); | ||||
|   | ||||
| @@ -74,7 +74,7 @@ int test(char *URL) | ||||
|     curl_easy_setopt(curl[i], CURLOPT_URL, URL); | ||||
|  | ||||
|     /* go verbose */ | ||||
|     curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1); | ||||
|     curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L); | ||||
|   } | ||||
|  | ||||
|   if ((m = curl_multi_init()) == NULL) { | ||||
| @@ -142,7 +142,7 @@ int test(char *URL) | ||||
|              the handle first too */ | ||||
|           curl_easy_reset(curl[0]); | ||||
|           curl_easy_setopt(curl[0], CURLOPT_URL, URL); | ||||
|           curl_easy_setopt(curl[0], CURLOPT_VERBOSE, 1); | ||||
|           curl_easy_setopt(curl[0], CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|           /* re-add it */ | ||||
|           res = (int)curl_multi_add_handle(m, curl[0]); | ||||
|   | ||||
| @@ -71,10 +71,10 @@ int test(char *URL) | ||||
|     curl_easy_setopt(curl[i], CURLOPT_URL, target_url); | ||||
|  | ||||
|     /* go verbose */ | ||||
|     curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1); | ||||
|     curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|     /* include headers */ | ||||
|     curl_easy_setopt(curl[i], CURLOPT_HEADER, 1); | ||||
|     curl_easy_setopt(curl[i], CURLOPT_HEADER, 1L); | ||||
|  | ||||
|     /* add handle to multi */ | ||||
|     if ((res = (int)curl_multi_add_handle(m, curl[i])) != CURLM_OK) { | ||||
| @@ -91,7 +91,7 @@ int test(char *URL) | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   curl_multi_setopt(m, CURLMOPT_PIPELINING, 1); | ||||
|   curl_multi_setopt(m, CURLMOPT_PIPELINING, 1L); | ||||
|  | ||||
|   ml_timedout = FALSE; | ||||
|   ml_start = tutil_tvnow(); | ||||
|   | ||||
| @@ -90,10 +90,10 @@ int test(char *URL) | ||||
|     return TEST_ERR_MAJOR_BAD; | ||||
|   } | ||||
|  | ||||
|   curl_multi_setopt(multi, CURLMOPT_PIPELINING, 1); | ||||
|   curl_multi_setopt(multi, CURLMOPT_PIPELINING, 1L); | ||||
|  | ||||
|   curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, fwrite); | ||||
|   curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1); | ||||
|   curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1L); | ||||
|   curl_easy_setopt(easy, CURLOPT_URL, URL); | ||||
|  | ||||
|   if (curl_multi_add_handle(multi, easy) != CURLM_OK) { | ||||
| @@ -107,7 +107,7 @@ int test(char *URL) | ||||
|   } | ||||
|   curl_easy_reset(easy); | ||||
|  | ||||
|   curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1); | ||||
|   curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1L); | ||||
|   curl_easy_setopt(easy, CURLOPT_URL, libtest_arg2); | ||||
|  | ||||
|   if (curl_multi_add_handle(multi, easy) != CURLM_OK) { | ||||
|   | ||||
| @@ -486,7 +486,7 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -30,9 +30,9 @@ static void init(CURLM *cm, const char* url, const char* userpwd, | ||||
|   curl_easy_setopt(eh, CURLOPT_URL, url); | ||||
|   curl_easy_setopt(eh, CURLOPT_PROXY, PROXY); | ||||
|   curl_easy_setopt(eh, CURLOPT_PROXYUSERPWD, userpwd); | ||||
|   curl_easy_setopt(eh, CURLOPT_PROXYAUTH, CURLAUTH_ANY); | ||||
|   curl_easy_setopt(eh, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(eh, CURLOPT_HEADER, 1); | ||||
|   curl_easy_setopt(eh, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY); | ||||
|   curl_easy_setopt(eh, CURLOPT_VERBOSE, 1L); | ||||
|   curl_easy_setopt(eh, CURLOPT_HEADER, 1L); | ||||
|   curl_easy_setopt(eh, CURLOPT_HTTPHEADER, headers); /* custom Host: */ | ||||
|  | ||||
|   curl_multi_add_handle(cm, eh); | ||||
|   | ||||
| @@ -89,10 +89,10 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   /* enable uploading */ | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); | ||||
|  | ||||
|   /* enable verbose */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* specify target */ | ||||
|   curl_easy_setopt(curl,CURLOPT_URL, URL); | ||||
|   | ||||
| @@ -50,13 +50,13 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   /* enable verbose */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* enable NOBODY */ | ||||
|   curl_easy_setopt(curl, CURLOPT_NOBODY, TRUE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); | ||||
|  | ||||
|   /* disable HEADER */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, FALSE) ; | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 0L); | ||||
|  | ||||
|   /* specify target */ | ||||
|   curl_easy_setopt(curl,CURLOPT_URL, URL); | ||||
|   | ||||
| @@ -35,13 +35,13 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|  | ||||
| #ifdef LIB545 | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, sizeof teststring - 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1); | ||||
| #endif | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring); | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */ | ||||
|  | ||||
|   /* Update the original data to detect non-copy. */ | ||||
|   strcpy(teststring, "FAIL"); | ||||
|   | ||||
| @@ -76,8 +76,8 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
| #ifdef LIB548 | ||||
|   /* set the data to POST with a mere pointer to a zero-terminated string */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, UPLOADTHIS); | ||||
| @@ -88,13 +88,13 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_READFUNCTION, readcallback); | ||||
|   curl_easy_setopt(curl, CURLOPT_READDATA, &counter); | ||||
|   /* We CANNOT do the POST fine without setting the size (or choose chunked)! */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS)); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(UPLOADTHIS)); | ||||
| #endif | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXYAUTH, | ||||
|                    CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC ); | ||||
|                    (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) ); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -32,11 +32,11 @@ int test(char *URL) | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|   if(libtest_arg3) | ||||
|     /* enable ascii/text mode */ | ||||
|     curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, TRUE); | ||||
|     curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L); | ||||
|  | ||||
|   res = curl_easy_perform(curl); | ||||
|  | ||||
|   | ||||
| @@ -158,17 +158,17 @@ int test(char *URL) | ||||
|     curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace); | ||||
|     curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config); | ||||
|     /* the DEBUGFUNCTION has no effect until we enable VERBOSE */ | ||||
|     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|     /* setup repeated data string */ | ||||
|     for (i=0; i < sizeof data; ++i) | ||||
|         data[i] = fill[i % sizeof fill]; | ||||
|  | ||||
|     /* Post */ | ||||
|     curl_easy_setopt(curl, CURLOPT_POST, 1); | ||||
|     curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|  | ||||
|     /* Setup read callback */ | ||||
|     curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, sizeof data); | ||||
|     curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof data); | ||||
|     curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); | ||||
|  | ||||
|     /* Write callback */ | ||||
| @@ -182,7 +182,7 @@ int test(char *URL) | ||||
|     curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|  | ||||
|     /* Accept any auth. But for this bug configure proxy with DIGEST, basic might work too, not NTLM */ | ||||
|     curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY); | ||||
|     curl_easy_setopt(curl, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY); | ||||
|  | ||||
|     res = curl_easy_perform(curl); | ||||
|     fprintf(stderr, "curl_easy_perform = %d\n", (int)res); | ||||
|   | ||||
| @@ -60,10 +60,10 @@ int test(char *URL) | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, POSTLEN); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)POSTLEN); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_READFUNCTION, myreadfunc); | ||||
|   res = curl_easy_perform(curl); | ||||
|   curl_easy_cleanup(curl); | ||||
|   | ||||
| @@ -96,7 +96,7 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|  | ||||
|   /* Now specify we want to POST data */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|  | ||||
|   /* Set the expected POST size */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft); | ||||
| @@ -111,10 +111,10 @@ int test(char *URL) | ||||
|   curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); | ||||
|  | ||||
|   /* get verbose debug output please */ | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|  | ||||
|   /* include headers in the output */ | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   /* Perform the request, res will get the return code */ | ||||
|   res = curl_easy_perform(curl); | ||||
|   | ||||
| @@ -80,8 +80,8 @@ int test(char *URL) | ||||
|   } | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_URL, URL); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, TRUE); | ||||
|   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_HEADER, 1L); | ||||
|  | ||||
|   /* read the POST data from a callback */ | ||||
|   curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback); | ||||
| @@ -91,11 +91,11 @@ int test(char *URL) | ||||
|   /* We CANNOT do the POST fine without setting the size (or choose chunked)! */ | ||||
|   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS)); | ||||
|  | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1); | ||||
|   curl_easy_setopt(curl, CURLOPT_POST, 1L); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3); | ||||
|   curl_easy_setopt(curl, CURLOPT_PROXYAUTH, | ||||
|                    CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC ); | ||||
|                    (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) ); | ||||
|  | ||||
|   if ((m = curl_multi_init()) == NULL) { | ||||
|     fprintf(stderr, "curl_multi_init() failed\n"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dan Fandrich
					Dan Fandrich