summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-12-13 18:23:50 +0100
committerJulian Andres Klode <jak@debian.org>2016-12-13 18:23:50 +0100
commitf47f4b195b4a4f8e72a6a120ed47a3d0120cd033 (patch)
treea988105a6aea038c555fc683f740da33fab5b2e4
parent196d70466490dc32a7b25e8a8b06216c8cdc8d3f (diff)
parent49b91f6903804183dbe1abb12ce1f9803a3dee5f (diff)
Merge pull request Debian/apt#31 from paperlessreceipts/https-forceipv
Honour Acquire::ForceIPv4/6 in the https transport
-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);