~ubuntu-branches/ubuntu/lucid/curl/lucid-201101212007

« back to all changes in this revision

Viewing changes to tests/libtest/lib513.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-18 15:21:57 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080618152157-qq94aiequcq35w6b
Tags: 7.18.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop the stunnel build dependency.
  - Drop the build-dependency on libdb4.5-dev
  - Add build-dependency on openssh-server
  - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * $Id: lib513.c,v 1.3 2006-10-25 09:20:44 yangtse Exp $
 
8
 * $Id: lib513.c,v 1.4 2008-05-22 21:49:52 danf Exp $
9
9
 */
10
10
 
11
11
#include "test.h"
39
39
  curl_easy_setopt(curl, CURLOPT_URL, URL);
40
40
 
41
41
  /* Now specify we want to POST data */
42
 
  curl_easy_setopt(curl, CURLOPT_POST, TRUE);
 
42
  curl_easy_setopt(curl, CURLOPT_POST, 1L);
43
43
 
44
44
  /* Set the expected POST size */
45
 
  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 1);
 
45
  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 1L);
46
46
 
47
47
  /* we want to use our own read function */
48
48
  curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
51
51
  curl_easy_setopt(curl, CURLOPT_INFILE, NULL);
52
52
 
53
53
  /* get verbose debug output please */
54
 
  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
 
54
  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
55
55
 
56
56
  /* include headers in the output */
57
 
  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
 
57
  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
58
58
 
59
59
  /* Perform the request, res will get the return code */
60
60
  res = curl_easy_perform(curl);