aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-01-15 11:58:28 -0500
committerShadowNinja <shadowninja@minetest.net>2014-01-15 12:10:53 -0500
commitf42f01758c72c28c0428f9eb0989e6846c72f7d1 (patch)
tree2d2a48eae3ad903b322aded4f6633b977617696b
parenta5287b6777f4146f3f687bf4c0515c636720ee9e (diff)
downloadminetest-f42f01758c72c28c0428f9eb0989e6846c72f7d1.tar.gz
minetest-f42f01758c72c28c0428f9eb0989e6846c72f7d1.tar.bz2
minetest-f42f01758c72c28c0428f9eb0989e6846c72f7d1.zip
Make default User-agent follow RFC 2616
-rw-r--r--src/httpfetch.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 2b93ade8b..bc029ed7a 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -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
}