Skip to content

Commit f42f017

Browse files
committedJan 15, 2014
Make default User-agent follow RFC 2616
1 parent a5287b6 commit f42f017

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/httpfetch.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ std::map<unsigned long, std::list<HTTPFetchResult> > g_httpfetch_results;
5050
timeout = g_settings->getS32("curl_timeout");
5151
connect_timeout = timeout * 5;
5252

53-
useragent = std::string("Minetest ") + minetest_version_hash;
53+
useragent = std::string("Minetest/") + minetest_version_hash + " ";
5454
#ifdef _WIN32
55-
useragent += "Windows";
55+
useragent += "(Windows)";
5656
#else
5757
struct utsname osinfo;
5858
uname(&osinfo);
59-
useragent += std::string(" (") + osinfo.sysname + "; " + osinfo.release + "; " + osinfo.machine + ")";
59+
useragent += std::string("(") + osinfo.sysname + "/"
60+
+ osinfo.release + " " + osinfo.machine + ")";
6061
#endif
6162
}
6263

0 commit comments

Comments
 (0)
Please sign in to comment.