mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-16 06:15:06 -05:00
Make default User-agent follow RFC 2616
This commit is contained in:
parent
a5287b6777
commit
f42f01758c
@ -50,13 +50,14 @@ std::map<unsigned long, std::list<HTTPFetchResult> > g_httpfetch_results;
|
||||
timeout = g_settings->getS32("curl_timeout");
|
||||
connect_timeout = timeout * 5;
|
||||
|
||||
useragent = std::string("Minetest ") + minetest_version_hash;
|
||||
useragent = std::string("Minetest/") + minetest_version_hash + " ";
|
||||
#ifdef _WIN32
|
||||
useragent += "Windows";
|
||||
useragent += "(Windows)";
|
||||
#else
|
||||
struct utsname osinfo;
|
||||
uname(&osinfo);
|
||||
useragent += std::string(" (") + osinfo.sysname + "; " + osinfo.release + "; " + osinfo.machine + ")";
|
||||
useragent += std::string("(") + osinfo.sysname + "/"
|
||||
+ osinfo.release + " " + osinfo.machine + ")";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user