summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-27 10:35:57 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-27 11:01:24 -0700
commit43ccd84af0707b29b146a9ea3d21094d6eb30e3a (patch)
treec2e371bf82366bbcae1ede8758d087c54572c489 /src/net/download.cpp
parent024ad66a350883597ba4c34d1c5868ef43c086a0 (diff)
downloadmana-43ccd84af0707b29b146a9ea3d21094d6eb30e3a.tar.gz
mana-43ccd84af0707b29b146a9ea3d21094d6eb30e3a.tar.bz2
mana-43ccd84af0707b29b146a9ea3d21094d6eb30e3a.tar.xz
mana-43ccd84af0707b29b146a9ea3d21094d6eb30e3a.zip
Report more info on client in cURL useragent and Desktop
Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp11
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);