From c6037f42499724bd02d2a91b30b2f769a8fb5b87 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 6 Aug 2014 14:53:25 +0200 Subject: [PATCH] curl*: remove unneeded option declarations They are equivalent to CURLOPT_USERPWD used a couple of line above and aren't supported by curl versions older than 7.19.1 --- src/curl.c | 6 +----- src/curl_json.c | 6 +----- src/curl_xml.c | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/curl.c b/src/curl.c index 3e7c5a5d..0e6596d4 100644 --- a/src/curl.c +++ b/src/curl.c @@ -389,13 +389,9 @@ static int cc_page_init_curl (web_page_t *wp) /* {{{ */ ssnprintf (wp->credentials, credentials_size, "%s:%s", wp->user, (wp->pass == NULL) ? "" : wp->pass); curl_easy_setopt (wp->curl, CURLOPT_USERPWD, wp->credentials); - + if (wp->digest) - { curl_easy_setopt (wp->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); - curl_easy_setopt (wp->curl, CURLOPT_USERNAME, wp->user); - curl_easy_setopt (wp->curl, CURLOPT_PASSWORD, wp->pass); - } } curl_easy_setopt (wp->curl, CURLOPT_SSL_VERIFYPEER, (long) wp->verify_peer); diff --git a/src/curl_json.c b/src/curl_json.c index 6a015902..58f0b35c 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -611,13 +611,9 @@ static int cj_init_curl (cj_t *db) /* {{{ */ ssnprintf (db->credentials, credentials_size, "%s:%s", db->user, (db->pass == NULL) ? "" : db->pass); curl_easy_setopt (db->curl, CURLOPT_USERPWD, db->credentials); - + if (db->digest) - { curl_easy_setopt (db->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); - curl_easy_setopt (db->curl, CURLOPT_USERNAME, db->user); - curl_easy_setopt (db->curl, CURLOPT_PASSWORD, db->pass); - } } curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, (long) db->verify_peer); diff --git a/src/curl_xml.c b/src/curl_xml.c index 6d36d29d..850a4aa5 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -861,13 +861,9 @@ static int cx_init_curl (cx_t *db) /* {{{ */ ssnprintf (db->credentials, credentials_size, "%s:%s", db->user, (db->pass == NULL) ? "" : db->pass); curl_easy_setopt (db->curl, CURLOPT_USERPWD, db->credentials); - + if (db->digest) - { curl_easy_setopt (db->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); - curl_easy_setopt (db->curl, CURLOPT_USERNAME, db->user); - curl_easy_setopt (db->curl, CURLOPT_PASSWORD, db->pass); - } } curl_easy_setopt (db->curl, CURLOPT_SSL_VERIFYPEER, db->verify_peer ? 1L : 0L); -- 2.11.0