Added Stephen's patch to include a user agent setting.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7809 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
bb3352637c
commit
a9f73b26be
@ -239,6 +239,10 @@ std::string NetworkHttp::downloadToStrInternal(std::string url)
|
||||
std::string full_url = (std::string)UserConfigParams::m_server_addons
|
||||
+ "/" + url;
|
||||
curl_easy_setopt(session, CURLOPT_URL, full_url.c_str());
|
||||
#ifdef VERSION
|
||||
std::string uagent = (std::string)"SuperTuxKart/" + VERSION;
|
||||
curl_easy_setopt(session, CURLOPT_USERAGENT, uagent.c_str());
|
||||
#endif
|
||||
|
||||
std::string fout;
|
||||
|
||||
@ -270,6 +274,10 @@ bool NetworkHttp::downloadFileInternal(const std::string &file,
|
||||
std::string full_url = (std::string)UserConfigParams::m_server_addons
|
||||
+ "/" + file;
|
||||
curl_easy_setopt(session, CURLOPT_URL, full_url.c_str());
|
||||
#ifdef VERSION
|
||||
std::string uagent = (std::string)"SuperTuxKart/" + VERSION;
|
||||
curl_easy_setopt(session, CURLOPT_USERAGENT, uagent.c_str());
|
||||
#endif
|
||||
FILE * fout = fopen(file_manager->getAddonsFile(save_filename).c_str(),
|
||||
"wb");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user