httpfetch: Disable IPv6 here too if requested by settings (#8399)

This commit is contained in:
sfan5 2019-03-18 15:06:27 +01:00 committed by Loïc Blot
parent c0fb5dd317
commit 426bdba7fb
1 changed files with 4 additions and 0 deletions

View File

@ -253,6 +253,10 @@ HTTPFetchOngoing::HTTPFetchOngoing(const HTTPFetchRequest &request_,
curl_easy_setopt(curl, CURLOPT_INTERFACE, bind_address.c_str());
}
if (!g_settings->getBool("enable_ipv6")) {
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
}
#if LIBCURL_VERSION_NUM >= 0x071304
// Restrict protocols so that curl vulnerabilities in
// other protocols don't affect us.