From: ShadowNinja Date: Wed, 15 Jan 2014 16:58:28 +0000 (-0500) Subject: Make default User-agent follow RFC 2616 X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=f42f01758c72c28c0428f9eb0989e6846c72f7d1;p=zefram%2Fminetest%2Fminetest_engine.git Make default User-agent follow RFC 2616 --- diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 2b93ade8..bc029ed7 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -50,13 +50,14 @@ std::map > 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 }