Commit a6d666e1 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

tests: Use CURLOPT_READDATA instead of the obsolete CURLOPT_INFILE

parent 455bfedc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ int test(char *URL)
  test_setopt(curl, CURLOPT_POSTQUOTE, headerlist);

  /* 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) */
  test_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ int test(char *URL)
  test_setopt(curl, CURLOPT_READFUNCTION, read_callback);

  /* pointer to pass to our read function */
  test_setopt(curl, CURLOPT_INFILE, &pooh);
  test_setopt(curl, CURLOPT_READDATA, &pooh);

  /* get verbose debug output please */
  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ int test(char *URL)
  test_setopt(curl, CURLOPT_READFUNCTION, read_callback);

  /* pointer to pass to our read function */
  test_setopt(curl, CURLOPT_INFILE, &pooh);
  test_setopt(curl, CURLOPT_READDATA, &pooh);

  /* get verbose debug output please */
  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ int test(char *URL)
  test_setopt(curl, CURLOPT_READFUNCTION, read_callback);

  /* pointer to pass to our read function */
  test_setopt(curl, CURLOPT_INFILE, NULL);
  test_setopt(curl, CURLOPT_READDATA, NULL);

  /* get verbose debug output please */
  test_setopt(curl, CURLOPT_VERBOSE, 1L);
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ int test(char *URL)
  test_setopt(curl,CURLOPT_URL, URL);

  /* 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! */
  res = curl_easy_perform(curl);
Loading