diff options
author | Sfan5 <sfan5@live.de> | 2014-01-19 14:32:03 +0100 |
---|---|---|
committer | Sfan5 <sfan5@live.de> | 2014-01-23 22:27:13 +0100 |
commit | cd7e8372f3c83531afe5d5c2460ecb95540f9d0d (patch) | |
tree | 394e065a8c1ac8408e735180ffd9ef9bc5675722 /src/httpfetch.cpp | |
parent | 1b5b6fe6929404ae416ac33c31df7d795d444614 (diff) | |
download | minetest-cd7e8372f3c83531afe5d5c2460ecb95540f9d0d.tar.gz minetest-cd7e8372f3c83531afe5d5c2460ecb95540f9d0d.tar.bz2 minetest-cd7e8372f3c83531afe5d5c2460ecb95540f9d0d.zip |
Include system info in the HTTP user agent on Windows
Diffstat (limited to 'src/httpfetch.cpp')
-rw-r--r-- | src/httpfetch.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 599507562..2eca363d7 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -18,16 +18,13 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "socket.h" // for select() -#include "porting.h" // for sleep_ms() +#include "porting.h" // for sleep_ms(), get_sysinfo() #include "httpfetch.h" #include <iostream> #include <sstream> #include <list> #include <map> #include <errno.h> -#ifndef _WIN32 -#include <sys/utsname.h> -#endif #include "jthread/jevent.h" #include "config.h" #include "exceptions.h" @@ -50,15 +47,7 @@ HTTPFetchRequest::HTTPFetchRequest() timeout = g_settings->getS32("curl_timeout"); connect_timeout = timeout * 5; - useragent = std::string("Minetest/") + minetest_version_hash + " "; -#ifdef _WIN32 - useragent += "(Windows)"; -#else - struct utsname osinfo; - uname(&osinfo); - useragent += std::string("(") + osinfo.sysname + "/" - + osinfo.release + " " + osinfo.machine + ")"; -#endif + useragent = std::string("Minetest/") + minetest_version_hash + " (" + porting::get_sysinfo() + ")"; } |