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

« back to all changes in this revision

Viewing changes to tests/libtest/lib516.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: lib516.c,v 1.5 2008-09-20 04:26:57 yangtse Exp $
9
8
 */
10
9
 
11
10
#include "test.h"
29
28
  }
30
29
 
31
30
  /* First set the URL that is about to receive our POST. */
32
 
  curl_easy_setopt(curl, CURLOPT_URL, URL);
33
 
  curl_easy_setopt(curl, CURLOPT_HTTPPOST, NULL);
34
 
  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
35
 
  curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
31
  test_setopt(curl, CURLOPT_URL, URL);
 
32
  test_setopt(curl, CURLOPT_HTTPPOST, NULL);
 
33
  test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
 
34
  test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
36
35
 
37
36
  /* Now, we should be making a zero byte POST request */
38
37
  res = curl_easy_perform(curl);
39
38
 
 
39
test_cleanup:
 
40
 
40
41
  /* always cleanup */
41
42
  curl_easy_cleanup(curl);
42
43
  curl_global_cleanup();