Add platform to user-agent string for Windows and Macintosh to help gauge platform usage
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9531 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -475,6 +475,16 @@ CURLcode NetworkHttp::downloadFileInternal(Request *request)
|
||||
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_URL, full_url.c_str());
|
||||
std::string uagent = (std::string)"SuperTuxKart/" + STK_VERSION;
|
||||
// Add platform to user-agent string for informational purposes
|
||||
// FIXME: Is there a way to identify linux other than just ruling out
|
||||
// windows and mac?
|
||||
#ifdef WIN32
|
||||
uagent += (std::string)" (Windows)";
|
||||
#else
|
||||
# ifdef __APPLE__
|
||||
uagent += (std::string)" (Macintosh)";
|
||||
# endif
|
||||
#endif
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_USERAGENT, uagent.c_str());
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_PROGRESSDATA, request);
|
||||
|
||||
Reference in New Issue
Block a user