~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to tests/libtest/lib544.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-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: lib544.c,v 1.4 2009-05-08 02:14:50 yangtse Exp $
9
8
 */
10
9
 
11
10
#include "test.h"
40
39
  }
41
40
 
42
41
  /* First set the URL that is about to receive our POST. */
43
 
  curl_easy_setopt(curl, CURLOPT_URL, URL);
 
42
  test_setopt(curl, CURLOPT_URL, URL);
44
43
 
45
44
#ifdef LIB545
46
 
  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1);
 
45
  test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1);
47
46
#endif
48
47
 
49
 
  curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring);
 
48
  test_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring);
50
49
 
51
 
  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
52
 
  curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
50
  test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
 
51
  test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
53
52
 
54
53
  /* Update the original data to detect non-copy. */
55
54
  strcpy(teststring, "FAIL");
57
56
  /* Now, this is a POST request with binary 0 embedded in POST data. */
58
57
  res = curl_easy_perform(curl);
59
58
 
 
59
test_cleanup:
 
60
 
60
61
  /* always cleanup */
61
62
  curl_easy_cleanup(curl);
62
63
  curl_global_cleanup();