summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-08 15:31:08 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-08 15:31:08 +0300
commit2905b7c3e14cb2c96656f0c0c0a5c21513941cc3 (patch)
tree7a00dc2990e5344fe0a644005ee2154d6fa75e21 /plugins/PluginUpdater
parentd7db433ed83362cd9b4da2ff6582962995f87c41 (diff)
PluginUpdater to pass correct Miranda's version to the server
Diffstat (limited to 'plugins/PluginUpdater')
-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";