From 93a09024ab433c866e87c5a6e33f982d7e8e32ab Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 26 Aug 2019 14:57:51 +0300 Subject: unified fake User-Agent field generation for all http-related protocols --- plugins/PluginUpdater/src/Utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 335a85b5f6..9c991c3462 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -228,10 +228,12 @@ bool DownloadFile(FILEURL *pFileURL, HNETLIBCONN &nlc) *p = 0; rtrim(szMirVer); - int osVer = LOWORD(GetVersion()); + char szOsVer[100]; + OS_GetShortString(szOsVer, _countof(szOsVer)); + CMStringA szUserAgent("Miranda NG/"); szUserAgent.Append(szMirVer); - szUserAgent.AppendFormat(" (Windows NT %d.%d", LOBYTE(osVer), HIBYTE(osVer)); + szUserAgent.AppendFormat(" (%s", szOsVer); #ifdef _WIN64 szUserAgent.Append("; Win64; x64"); #endif -- cgit v1.2.3