diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Gadu-Gadu/src/avatar.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/libgadu/libgadu.h | 3 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_global.h | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/socket.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp | 9 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/yahoo.cpp | 4 |
8 files changed, 14 insertions, 12 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index c43f9e0dfa..a28c471e2a 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -424,7 +424,7 @@ void __cdecl GGPROTO::setavatarthread(void *param) httpHeaders[5].szName = "User-Agent";
httpHeaders[5].szValue = "avatars to avatars";
httpHeaders[6].szName = "From";
- httpHeaders[6].szValue = "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.7.1 Safari/533.3";
+ httpHeaders[6].szValue = NETLIB_USER_AGENT;
httpHeaders[7].szName = "Content-type";
httpHeaders[7].szValue = "application/x-www-form-urlencoded; charset=utf-8";
httpHeaders[8].szName = "Accept";
diff --git a/protocols/Gadu-Gadu/src/libgadu/libgadu.h b/protocols/Gadu-Gadu/src/libgadu/libgadu.h index 6d2db69f96..33224836c3 100644 --- a/protocols/Gadu-Gadu/src/libgadu/libgadu.h +++ b/protocols/Gadu-Gadu/src/libgadu/libgadu.h @@ -39,6 +39,7 @@ #ifdef GG_CONFIG_MIRANDA #include <m_ssl.h> +#include <m_netlib.h> #endif #if defined(__cplusplus) || defined(_WIN32) @@ -1542,7 +1543,7 @@ int gg_dcc7_handle_abort(struct gg_session *sess, struct gg_event *e, void *payl #define GG_DEFAULT_PORT 8074 #define GG_HTTPS_PORT 443 -#define GG_HTTP_USERAGENT "Mozilla/4.7 [en] (Win98; I)" +#define GG_HTTP_USERAGENT NETLIB_USER_AGENT #define GG_DEFAULT_CLIENT_VERSION "10.1.0.11070" #define GG_DEFAULT_PROTOCOL_VERSION 0x2e diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 825cdd8068..fcab8c9715 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -182,7 +182,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const TCHAR* aUserName) : nlu.ptszDescriptiveName = szBuffer;
nlu.szSettingsModule = m_szModuleName;
nlu.szHttpGatewayHello = "http://http.proxy.icq.com/hello";
- nlu.szHttpGatewayUserAgent = "Mozilla/4.08 [en] (WinNT; U ;Nav)";
+ nlu.szHttpGatewayUserAgent = NETLIB_USER_AGENT;
nlu.pfnHttpGatewayInit = icq_httpGatewayInit;
nlu.pfnHttpGatewayBegin = icq_httpGatewayBegin;
nlu.pfnHttpGatewayWrapSend = icq_httpGatewayWrapSend;
diff --git a/protocols/MSN/src/msn_global.h b/protocols/MSN/src/msn_global.h index 5eb3ebba1b..8756e2bd23 100644 --- a/protocols/MSN/src/msn_global.h +++ b/protocols/MSN/src/msn_global.h @@ -128,7 +128,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MSN_DEFAULT_GATEWAY_PORT 80
const char MSN_DEFAULT_LOGIN_SERVER[] = "messenger.hotmail.com";
const char MSN_DEFAULT_GATEWAY[] = "gateway.messenger.hotmail.com";
-const char MSN_USER_AGENT[] = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)";
+const char MSN_USER_AGENT[] = NETLIB_USER_AGENT;
#define MSN_BLOCK "/BlockCommand"
#define MSN_INVITE "/InviteCommand"
diff --git a/protocols/Xfire/src/socket.cpp b/protocols/Xfire/src/socket.cpp index 302e117d4f..1863639249 100644 --- a/protocols/Xfire/src/socket.cpp +++ b/protocols/Xfire/src/socket.cpp @@ -214,7 +214,7 @@ bool Socket::connect ( const std::string host, const int port, int useproxy,std: /*if (useproxy&&status==0) {
char temp[1024];
- this->send("CONNECT cs.xfire.com:25999 HTTP/1.1\nHost: cs.xfire.com:25999\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\n\n");
+ this->send("CONNECT cs.xfire.com:25999 HTTP/1.1\nHost: cs.xfire.com:25999\nUser-Agent: " + NETLIB_USER_AGENT + "\n\n");
this->recv((char*)temp,1024);
}*/
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp index 551c64fbe7..2f3a8d1485 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp +++ b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp @@ -329,13 +329,14 @@ void yahoo_http_post(int id, const char *url, const char *cookies, long content_ snprintf(buff, sizeof(buff),
"POST %s HTTP/1.0\r\n"
- "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
+ "User-Agent: %s\r\n"
"Pragma: no-cache\r\n"
"Host: %s\r\n"
"Content-Length: %ld\r\n"
"%s"
"\r\n",
- path,
+ path,
+ NETLIB_USER_AGENT,
host, content_length,
ck);
@@ -361,12 +362,12 @@ void yahoo_http_get(int id, const char *url, const char *cookies, snprintf(buff, sizeof(buff),
"GET %s HTTP/1.0\r\n"
- "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
+ "User-Agent: %s\r\n"
"Pragma: no-cache\r\n"
"Host: %s\r\n"
"%s"
"\r\n",
- path, host, ck);
+ path, NETLIB_USER_AGENT, host, ck);
yahoo_send_http_request(id, host, port, buff, callback, data);
}
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 020574af1b..10ec6ed568 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -83,7 +83,7 @@ int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM) #ifdef HTTP_GATEWAY
// Here comes the Gateway Code!
nlu.szHttpGatewayHello = NULL;
- nlu.szHttpGatewayUserAgent = "User-Agent: Mozilla/4.01 [en] (Win95; I)";
+ nlu.szHttpGatewayUserAgent = "User-Agent: " + NETLIB_USER_AGENT;
nlu.pfnHttpGatewayInit = YAHOO_httpGatewayInit;
nlu.pfnHttpGatewayBegin = NULL;
nlu.pfnHttpGatewayWrapSend = YAHOO_httpGatewayWrapSend;
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index 70541ad599..c26ff0573a 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -1283,7 +1283,7 @@ void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const c }
httpHeaders[i].szName = "User-Agent";
- httpHeaders[i].szValue = "Mozilla/4.0 (compatible; MSIE 5.5)";
+ httpHeaders[i].szValue = NETLIB_USER_AGENT;
i++;
httpHeaders[i].szName = "Host";
@@ -1451,7 +1451,7 @@ char * CYahooProto::ext_send_https_request(struct yahoo_data *yd, const char *ho nlhr.headersCount = 3;
nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*(nlhr.headersCount+5));
nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 5.5)";
+ nlhr.headers[0].szValue = NETLIB_USER_AGENT;
nlhr.headers[1].szName = "Cache-Control";
nlhr.headers[1].szValue = "no-cache";
nlhr.headers[2].szName = "Connection";
|