diff options
Diffstat (limited to 'protocols/Yahoo/src')
-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 |
3 files changed, 8 insertions, 7 deletions
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";
|