summaryrefslogtreecommitdiff
path: root/src/httpfetch.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-09-14 20:58:21 -0400
committerShadowNinja <shadowninja@minetest.net>2014-09-18 21:54:23 -0400
commit8852333eb3042580592ade478e5def20f8ed5d4c (patch)
treef7fcd6614a7e456cbe211410fe43fa417405da6c /src/httpfetch.cpp
parent86a3c8ce566f28112dc032aa48c40e12fde97be2 (diff)
downloadminetest-8852333eb3042580592ade478e5def20f8ed5d4c.tar.gz
minetest-8852333eb3042580592ade478e5def20f8ed5d4c.tar.bz2
minetest-8852333eb3042580592ade478e5def20f8ed5d4c.zip
Use configured bind_address for HTTPFetch
Diffstat (limited to 'src/httpfetch.cpp')
-rw-r--r--src/httpfetch.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index f61dbbf71..47e33480b 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -221,6 +221,11 @@ HTTPFetchOngoing::HTTPFetchOngoing(HTTPFetchRequest request_, CurlHandlePool *po
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 1);
+ std::string bind_address = g_settings->get("bind_address");
+ if (!bind_address.empty()) {
+ curl_easy_setopt(curl, CURLOPT_INTERFACE, bind_address.c_str());
+ }
+
#if LIBCURL_VERSION_NUM >= 0x071304
// Restrict protocols so that curl vulnerabilities in
// other protocols don't affect us.