diff options
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r-- | src/net/download.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index ba5b6b35..2b96a6b9 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -20,9 +20,12 @@ #include "net/download.h" +#include "configuration.h" #include "log.h" #include "main.h" +#include "utils/stringutils.h" + #include <curl/curl.h> #include <SDL.h> @@ -217,11 +220,9 @@ int Download::downloadThread(void *ptr) curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, file); } -#ifdef PACKAGE_VERSION - curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, "Mana/" PACKAGE_VERSION); -#else - curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, "Mana"); -#endif + curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, + strprintf(PACKAGE_EXTENDED_VERSION, branding + .getValue("appShort", "mana").c_str()).c_str()); curl_easy_setopt(d->mCurl, CURLOPT_ERRORBUFFER, d->mError); curl_easy_setopt(d->mCurl, CURLOPT_URL, d->mUrl.c_str()); curl_easy_setopt(d->mCurl, CURLOPT_NOPROGRESS, 0); |