summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index b57676e6dd..7b0b1b704c 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -220,6 +220,9 @@ bool ParseHashes(const wchar_t *ptszUrl, ptrW &baseUrl, SERVLIST &arHashes)
bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc)
{
+ char szMirVer[1000];
+ Miranda_GetVersionText(szMirVer, _countof(szMirVer));
+
NETLIBHTTPREQUEST nlhr = {0};
nlhr.cbSize = sizeof(nlhr);
nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_PERSISTENT;
@@ -230,7 +233,7 @@ bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc)
nlhr.headersCount = 4;
nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = NETLIB_USER_AGENT;
+ nlhr.headers[0].szValue = szMirVer;
nlhr.headers[1].szName = "Connection";
nlhr.headers[1].szValue = "close";
nlhr.headers[2].szName = "Cache-Control";