User agent in http fetcher

This commit is contained in:
def 2017-09-03 09:18:00 +02:00
parent 0a09af4b33
commit f2a7f5f8dd
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,7 @@
#include <base/system.h>
#include <engine/storage.h>
#include <engine/shared/config.h>
#include <game/version.h>
#include "fetcher.h"
CFetchTask::CFetchTask(bool canTimeout, bool useDDNetCA)
@ -158,6 +159,7 @@ void CFetcher::FetchFile(CFetchTask *pTask)
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask);
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback);
curl_easy_setopt(m_pHandle, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(m_pHandle, CURLOPT_USERAGENT, "DDNet " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_FAMILY_STRING "; " CONF_ARCH_STRING ")");
dbg_msg("fetcher", "downloading %s", pTask->m_aDest);
pTask->m_State = CFetchTask::STATE_RUNNING;

View file

@ -5,6 +5,6 @@
#include "generated/nethash.cpp"
#define GAME_VERSION "0.6.3, 10.8.3"
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
static const char GAME_RELEASE_VERSION[8] = "10.8.3";
#define GAME_RELEASE_VERSION "10.8.3"
#define CLIENT_VERSIONNR 10083
#endif