From 49b91f6903804183dbe1abb12ce1f9803a3dee5f Mon Sep 17 00:00:00 2001 From: Lukasz Kawczynski Date: Thu, 8 Dec 2016 13:48:12 +0000 Subject: Honour Acquire::ForceIPv4/6 in the https transport --- methods/https.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'methods') 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); -- cgit v1.2.3