summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorLukasz Kawczynski <n@neuroid.pl>2016-12-08 13:48:12 +0000
committerLukasz Kawczynski <n@neuroid.pl>2016-12-08 13:48:12 +0000
commit49b91f6903804183dbe1abb12ce1f9803a3dee5f (patch)
tree1b25505304d206034d2f32b3934a1b1b63ead5e3 /methods/https.cc
parent6761dae5d0c372d132b0df91753120b59e30fd0e (diff)
Honour Acquire::ForceIPv4/6 in the https transport
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/methods/https.cc b/methods/https.cc
index b2d05136c..1bdd394ad 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -361,6 +361,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout);
+ if(_config->FindB("Acquire::ForceIPv4", false) == true)
+ curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
+ else if(_config->FindB("Acquire::ForceIPv6", false) == true)
+ curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
+
// debug
if (Debug == true)
curl_easy_setopt(curl, CURLOPT_VERBOSE, true);