diff options
author | George Hazan <ghazan@miranda.im> | 2019-08-26 14:57:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-08-26 14:57:51 +0300 |
commit | 93a09024ab433c866e87c5a6e33f982d7e8e32ab (patch) | |
tree | 13f86c292e2f4a628834a55466e27993ca99864a /plugins | |
parent | cb2efce1a4fe9c89c5fef63b3aca63f3e63983fc (diff) |
unified fake User-Agent field generation for all http-related protocols
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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
|