1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * $Id: lib542.c,v 1.1.1.1 2008-09-23 16:32:06 hoffman Exp $
11 #include "setup.h" /* struct_stat etc. */
14 #ifdef HAVE_SYS_SOCKET_H
15 #include <sys/socket.h>
17 #ifdef HAVE_SYS_TYPES_H
18 #include <sys/types.h>
20 #ifdef HAVE_SYS_STAT_H
32 * FTP get with NOBODY but no HEADER
38 CURLcode res
= CURLE_OK
;
40 if (curl_global_init(CURL_GLOBAL_ALL
) != CURLE_OK
) {
41 fprintf(stderr
, "curl_global_init() failed\n");
42 return TEST_ERR_MAJOR_BAD
;
45 /* get a curl handle */
46 if ((curl
= curl_easy_init()) == NULL
) {
47 fprintf(stderr
, "curl_easy_init() failed\n");
48 curl_global_cleanup();
49 return TEST_ERR_MAJOR_BAD
;
53 curl_easy_setopt(curl
, CURLOPT_VERBOSE
, 1L);
56 curl_easy_setopt(curl
, CURLOPT_NOBODY
, 1L);
59 curl_easy_setopt(curl
, CURLOPT_HEADER
, 0L);
62 curl_easy_setopt(curl
,CURLOPT_URL
, URL
);
64 /* Now run off and do what you've been told! */
65 res
= curl_easy_perform(curl
);
67 curl_easy_cleanup(curl
);
68 curl_global_cleanup();