summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Kawczynski <n@neuroid.pl>2016-12-08 13:48:12 +0000
committerJulian Andres Klode <jak@debian.org>2017-02-22 18:11:43 +0100
commit6d6b3ebb49a6790b93deaf653e64d35126ec52b1 (patch)
tree05aabe6532f599f4344a61e47c4283f3a8e42593
parent2dec4c01b4d2a73c7abe0a22cde2937af4c731ec (diff)
Honour Acquire::ForceIPv4/6 in the https transport
(cherry picked from commit 49b91f6903804183dbe1abb12ce1f9803a3dee5f) (cherry picked from commit 4034726bfa6d9835bca90c6b4cd276c2fba2aea8)
-rw-r--r--methods/https.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/methods/https.cc b/methods/https.cc
index 84f95e047..85733ecd4 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -366,6 +366,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, AllowRedirect);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10);
+ 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);