diff options
author | proller <proler@github.com> | 2013-11-05 16:57:43 +0400 |
---|---|---|
committer | proller <proler@github.com> | 2013-11-06 00:50:32 +0400 |
commit | 8903c68460d79aeac6b1c5074003743f98371339 (patch) | |
tree | f96de4f3e1398b68e3316a9641f31ef0aad996af /src/client.cpp | |
parent | 6f44492238c89079402a984466d037f4558924e6 (diff) | |
download | minetest-8903c68460d79aeac6b1c5074003743f98371339.tar.gz minetest-8903c68460d79aeac6b1c5074003743f98371339.tar.bz2 minetest-8903c68460d79aeac6b1c5074003743f98371339.zip |
Correct useragent in http queries
Net struct init
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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 <curl/curl.h> @@ -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(); |