diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-30 08:46:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-30 08:46:22 +0000 |
commit | eaa183e14a412210dac9320cdaa2114c555a24ac (patch) | |
tree | c69e683797fa80443a2c82b6df6335f452caa5b9 /plugins | |
parent | bd33df2d4b9534d2241283f2b20d83f5b1811ebc (diff) |
Miranda HTTP user agent unification (not to have problems with sites)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11955 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Dbx_mdb/src/dbevents.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 4 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/http.cpp | 2 | ||||
-rw-r--r-- | plugins/PackUpdater/Src/Utils.cpp | 2 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 2 | ||||
-rw-r--r-- | plugins/Quotes/src/HTTPSession.cpp | 2 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/download.cpp | 2 | ||||
-rw-r--r-- | plugins/Weather/src/weather_http.cpp | 2 | ||||
-rw-r--r-- | plugins/WebView/src/webview_getdata.cpp | 2 |
9 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp index a64678f434..96423dbc33 100644 --- a/plugins/Dbx_mdb/src/dbevents.cpp +++ b/plugins/Dbx_mdb/src/dbevents.cpp @@ -352,7 +352,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent cursor_ptr cursor(txn, m_dbEventsSort);
if (mdb_cursor_get(cursor, &key, &data, MDB_SET_KEY) != MDB_SUCCESS)
return 0;
- if (mdb_cursor_get(cursor, &key, &data, MDB_NEXT_NODUP) != MDB_SUCCESS)
+ if (mdb_cursor_get(cursor, &key, &data, MDB_NEXT) != MDB_SUCCESS)
return 0;
DBEventSortingKey *pKey = (DBEventSortingKey*)key.mv_data;
@@ -376,7 +376,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent cursor_ptr cursor(txn, m_dbEventsSort);
if (mdb_cursor_get(cursor, &key, &data, MDB_SET_KEY) != MDB_SUCCESS)
return 0;
- if (mdb_cursor_get(cursor, &key, &data, MDB_PREV_NODUP) != MDB_SUCCESS)
+ if (mdb_cursor_get(cursor, &key, &data, MDB_PREV) != MDB_SUCCESS)
return 0;
DBEventSortingKey *pKey = (DBEventSortingKey*)key.mv_data;
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 2f7ed8bafe..26d17c22a0 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -63,7 +63,7 @@ void GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg) nlhr.headersCount = 4;
nlhr.headers = headers;
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Cache-Control";
nlhr.headers[1].szValue = "no-cache";
nlhr.headers[2].szName = "Pragma";
@@ -387,7 +387,7 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) nlhr.headersCount = 4;
nlhr.headers = headers;
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Connection";
nlhr.headers[1].szValue = "close";
nlhr.headers[2].szName = "Cache-Control";
diff --git a/plugins/Non-IM Contact/src/http.cpp b/plugins/Non-IM Contact/src/http.cpp index 9ba9a80b6a..f67baf0391 100644 --- a/plugins/Non-IM Contact/src/http.cpp +++ b/plugins/Non-IM Contact/src/http.cpp @@ -45,7 +45,7 @@ int InternetDownloadFile (char *szUrl) nlhr.headers=(NETLIBHTTPHEADER*)malloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
memcpy(nlhr.headers,nlhr.headers,sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
nlhr.headers[nlhr.headersCount-1].szName="User-Agent";
- nlhr.headers[nlhr.headersCount-1].szValue="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[nlhr.headersCount-1].szValue=NETLIB_USER_AGENT;
// download the page
NETLIBHTTPREQUEST *nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlibUser,(LPARAM)&nlhr);
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index ef9ec95a38..9a898dd28c 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -120,7 +120,7 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) nlhr.headersCount = 4;
nlhr.headers = (NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Connection";
nlhr.headers[1].szValue = "close";
nlhr.headers[2].szName = "Cache-Control";
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 3d5ad55bcc..897950ecc5 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -296,7 +296,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc) nlhr.headersCount = 4;
nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Connection";
nlhr.headers[1].szValue = "close";
nlhr.headers[2].szName = "Cache-Control";
diff --git a/plugins/Quotes/src/HTTPSession.cpp b/plugins/Quotes/src/HTTPSession.cpp index 89fbd02cbb..f54a5cc69c 100644 --- a/plugins/Quotes/src/HTTPSession.cpp +++ b/plugins/Quotes/src/HTTPSession.cpp @@ -156,7 +156,7 @@ namespace nlhr.headersCount = 4;
nlhr.headers = (NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Connection";
nlhr.headers[1].szValue = "close";
nlhr.headers[2].szName = "Cache-Control";
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 1f6d928d95..8ccde91d0b 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -54,7 +54,7 @@ bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl) nlhr.headersCount = 2;
nlhr.headers=(NETLIBHTTPHEADER*)alloca(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Connection";
nlhr.headers[1].szValue = "close";
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp index 05547fd798..c59ee3bdfc 100644 --- a/plugins/Weather/src/weather_http.cpp +++ b/plugins/Weather/src/weather_http.cpp @@ -51,7 +51,7 @@ int findHeader(NETLIBHTTPREQUEST *nlhrReply, char *hdr) int InternetDownloadFile (char *szUrl, char *cookie, char *userAgent, TCHAR **szData)
{
if (userAgent == NULL || userAgent[0] == 0)
- userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
+ userAgent = NETLIB_USER_AGENT;
NETLIBHTTPHEADER headers[5];
headers[0].szName = "User-Agent";
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index c53d01f15d..5563711733 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -112,7 +112,7 @@ void GetData(void *param) NETLIBHTTPHEADER headers[2];
headers[0].szName = "User-Agent";
- headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
+ headers[0].szValue = NETLIB_USER_AGENT;
headers[1].szName = "Content-Length";
headers[1].szValue = NULL;
|