~ubuntu-branches/ubuntu/dapper/curl/dapper-security

« back to all changes in this revision

Viewing changes to tests/libtest/lib516.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-03-23 18:41:29 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050323184129-le70d05a0hk5w62j
Tags: 7.12.3-2ubuntu3
Fix the version numbers internal to debian/rules.  Closes; #8088

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "test.h"
 
2
 
 
3
int test(char *URL)
 
4
{
 
5
  CURL *curl;
 
6
  CURLcode res=CURLE_OK;
 
7
 
 
8
  curl = curl_easy_init();
 
9
  if(curl) {
 
10
    /* First set the URL that is about to receive our POST. */
 
11
    curl_easy_setopt(curl, CURLOPT_URL, URL);
 
12
    curl_easy_setopt(curl, CURLOPT_HTTPPOST, NULL);
 
13
    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */
 
14
    curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */
 
15
 
 
16
    /* Now, we should be making a zero byte POST request */
 
17
    res = curl_easy_perform(curl);
 
18
 
 
19
    /* always cleanup */
 
20
    curl_easy_cleanup(curl);
 
21
  }
 
22
  return (int)res;
 
23
}