diff libpurple/protocols/yahoo/yahoo_profile.c @ 22056:b0ed2ce8514d

A patch from Gideon N. Guillen, with some minor modifications from me. This patch fixes retrieval of buddy icons and setting of server-side aliases when using an HTTP proxy.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sun, 24 Feb 2008 18:20:52 +0000
parents 44b4e8bd759b
children 3225c99785b8
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_profile.c	Sun Jan 06 19:02:57 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_profile.c	Sun Feb 24 18:20:52 2008 +0000
@@ -932,11 +932,17 @@
 	/* Try to put the photo in there too, if there's one */
 	if (photo_url_text) {
 		PurpleUtilFetchUrlData *url_data;
+		gboolean use_whole_url = FALSE;
+
+		/* use whole URL if using HTTP Proxy */
+		if ((info_data->gc->account->proxy_info) && (info_data->gc->account->proxy_info->type == PURPLE_PROXY_HTTP))
+		    use_whole_url = TRUE;
+
 		/* User-uploaded photos use a different server that requires the Host
 		 * header, but Yahoo Japan will use the "chunked" content encoding if
 		 * we specify HTTP 1.1. So we have to specify 1.0 & fix purple_util_fetch_url
 		 */
-		url_data = purple_util_fetch_url(photo_url_text, FALSE, NULL,
+		url_data = purple_util_fetch_url(photo_url_text, use_whole_url, NULL,
 				FALSE, yahoo_got_photo, info2_data);
 		if (url_data != NULL)
 			yd->url_datas = g_slist_prepend(yd->url_datas, url_data);