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 16:53:45 +0100 |
commit | 4034726bfa6d9835bca90c6b4cd276c2fba2aea8 (patch) | |
tree | b8790534018991180bcbe7dd46c30ac1d7be47f7 /methods/https.cc | |
parent | 3c49cc213c9a7747a943419acc2939eb4215b8ef (diff) |
Honour Acquire::ForceIPv4/6 in the https transport
(cherry picked from commit 49b91f6903804183dbe1abb12ce1f9803a3dee5f)
Diffstat (limited to 'methods/https.cc')
-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 e69323ea6..418eefd90 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -365,6 +365,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); |