From 8903c68460d79aeac6b1c5074003743f98371339 Mon Sep 17 00:00:00 2001 From: proller Date: Tue, 5 Nov 2013 16:57:43 +0400 Subject: Correct useragent in http queries Net struct init --- src/client.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 98c9af972..5e8f20620 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -48,6 +48,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/serialize.h" #include "config.h" #include "util/directiontables.h" +#include "version.h" #if USE_CURL #include @@ -245,6 +246,7 @@ void * MediaFetchThread::Thread() std::ostringstream stream; curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &stream); + curl_easy_setopt(curl, CURLOPT_USERAGENT, (std::string("Minetest ")+minetest_version_hash).c_str()); res = curl_easy_perform(curl); if (res == CURLE_OK) { std::string data = stream.str(); -- cgit v1.2.3