projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0fb5dd
)
httpfetch: Disable IPv6 here too if requested by settings (#8399)
author
sfan5
<sfan5@live.de>
Mon, 18 Mar 2019 14:06:27 +0000
(15:06 +0100)
committer
Loïc Blot
<nerzhul@users.noreply.github.com>
Mon, 18 Mar 2019 14:06:27 +0000
(15:06 +0100)
src/httpfetch.cpp
patch
|
blob
|
history
diff --git
a/src/httpfetch.cpp
b/src/httpfetch.cpp
index 6b67e0e1323ee62c540f2b0131eb33f6d99faa18..326b5052ff4059fe41ceb96ea177b5124174251f 100644
(file)
--- a/
src/httpfetch.cpp
+++ b/
src/httpfetch.cpp
@@
-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.