Mercurial > pidgin.yaz
diff libpurple/protocols/yahoo/yahoo.c @ 23916:18a1f0fe5f40
Do a better job of detecting if the yahoo account is connecting through a HTTP
Proxy in order to generate acceptable HTTP requests.
Hopefully fixes #6527
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 27 Aug 2008 02:52:50 +0000 |
parents | 797377cbd5bf |
children | e339b3429965 f89bdd34c9f1 |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c Wed Aug 27 02:43:25 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Wed Aug 27 02:52:50 2008 +0000 @@ -3531,18 +3531,16 @@ PurpleUtilFetchUrlData *url_data; const char* base_url = "http://login.yahoo.com"; - char *request = g_strdup_printf( - "POST /config/cookie_token HTTP/1.0\r\n" + /* use whole URL if using HTTP Proxy */ + gboolean use_whole_url = yahoo_account_use_http_proxy(gc); + gchar *request = g_strdup_printf( + "POST %s/config/cookie_token HTTP/1.0\r\n" "Cookie: T=%s; path=/; domain=.yahoo.com; Y=%s;\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: login.yahoo.com\r\n" "Content-Length: 0\r\n\r\n", + use_whole_url ? base_url : "", yd->cookie_t, yd->cookie_y); - gboolean use_whole_url = FALSE; - - /* use whole URL if using HTTP Proxy */ - if ((gc->account->proxy_info) && (gc->account->proxy_info->type == PURPLE_PROXY_HTTP)) - use_whole_url = TRUE; url_data = purple_util_fetch_url_request(base_url, use_whole_url, "Mozilla/4.0 (compatible; MSIE 5.5)", TRUE, request, FALSE,