1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

tests: Use CURLOPT_READDATA instead of the obsolete CURLOPT_INFILE

This commit is contained in:
Dan Fandrich 2014-06-18 01:17:23 +02:00
parent 455bfedc84
commit a6d666e1a6
6 changed files with 6 additions and 6 deletions

View File

@ -126,7 +126,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_POSTQUOTE, headerlist); test_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
/* now specify which file to upload */ /* now specify which file to upload */
test_setopt(curl, CURLOPT_INFILE, hd_src); test_setopt(curl, CURLOPT_READDATA, hd_src);
/* and give the size of the upload (optional) */ /* and give the size of the upload (optional) */
test_setopt(curl, CURLOPT_INFILESIZE_LARGE, test_setopt(curl, CURLOPT_INFILESIZE_LARGE,

View File

@ -86,7 +86,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback); test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */ /* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, &pooh); test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */ /* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_VERBOSE, 1L);

View File

@ -97,7 +97,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback); test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */ /* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, &pooh); test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */ /* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_VERBOSE, 1L);

View File

@ -61,7 +61,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback); test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */ /* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, NULL); test_setopt(curl, CURLOPT_READDATA, NULL);
/* get verbose debug output please */ /* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_VERBOSE, 1L);

View File

@ -96,7 +96,7 @@ int test(char *URL)
test_setopt(curl,CURLOPT_URL, URL); test_setopt(curl,CURLOPT_URL, URL);
/* now specify which file to upload */ /* now specify which file to upload */
test_setopt(curl, CURLOPT_INFILE, hd_src); test_setopt(curl, CURLOPT_READDATA, hd_src);
/* Now run off and do what you've been told! */ /* Now run off and do what you've been told! */
res = curl_easy_perform(curl); res = curl_easy_perform(curl);

View File

@ -126,7 +126,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_READFUNCTION, read_callback); test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */ /* pointer to pass to our read function */
test_setopt(curl, CURLOPT_INFILE, &pooh); test_setopt(curl, CURLOPT_READDATA, &pooh);
/* get verbose debug output please */ /* get verbose debug output please */
test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_VERBOSE, 1L);