From 2905b7c3e14cb2c96656f0c0c0a5c21513941cc3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 8 Dec 2018 15:31:08 +0300 Subject: PluginUpdater to pass correct Miranda's version to the server --- plugins/PluginUpdater/src/Utils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"; -- cgit v1.2.3