summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-03-02 15:42:34 +0000
committerJason Woodward2005-03-02 15:42:34 +0000
commita575ec011ade11c8ab866b62d1c2ba8b059216a2 (patch)
tree4ac0fc1bdb261cdb0413afff69fe01664fc8ef8d /src
parentd8e84e6049a8c8678943eca7766f032e6e7a4e49 (diff)
downloadslapt-get-a575ec011ade11c8ab866b62d1c2ba8b059216a2.tar.gz
wrapped CURLOPT_HTTPAUTH in ifdef in case we are building against an old version of libcurl
Diffstat (limited to 'src')
-rw-r--r--src/curl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/curl.c b/src/curl.c
index 031433d..5d056c2 100644
--- a/src/curl.c
+++ b/src/curl.c
@@ -40,7 +40,9 @@ int download_data(FILE *fh,const char *url,size_t bytes,const rc_config *global_
curl_easy_setopt(ch, CURLOPT_FTP_USE_EPRT, 0);
#endif
curl_easy_setopt(ch, CURLOPT_FAILONERROR, 1);
+#ifdef CURLOPT_HTTPAUTH
curl_easy_setopt(ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
+#endif
headers = curl_slist_append(headers, "Pragma: "); /* override no-cache */
@@ -130,7 +132,9 @@ char *head_request(const char *url){
curl_easy_setopt(ch, CURLOPT_FTP_USE_EPRT, 0);
#endif
curl_easy_setopt(ch, CURLOPT_FAILONERROR, 1);
+#ifdef CURLOPT_HTTPAUTH
curl_easy_setopt(ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
+#endif
headers = curl_slist_append(headers, "Pragma: "); /* override no-cache */