diff options
author | Lukasz Kawczynski <n@neuroid.pl> | 2016-12-08 13:48:12 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-02-22 18:11:43 +0100 |
commit | 6d6b3ebb49a6790b93deaf653e64d35126ec52b1 (patch) | |
tree | 05aabe6532f599f4344a61e47c4283f3a8e42593 /methods | |
parent | 2dec4c01b4d2a73c7abe0a22cde2937af4c731ec (diff) |
Honour Acquire::ForceIPv4/6 in the https transport
(cherry picked from commit 49b91f6903804183dbe1abb12ce1f9803a3dee5f)
(cherry picked from commit 4034726bfa6d9835bca90c6b4cd276c2fba2aea8)
Diffstat (limited to 'methods')
-rw-r--r-- | methods/https.cc | 5 |
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); |