changeset 10575:96307e1a47c9

[gaim-migrate @ 11968] This makes Yahoo roomlist & filetransfer work with HTTP proxies (except when authentication is needed), webauth probably works too but I couldn't work out how to test that. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 05 Feb 2005 18:24:50 +0000
parents 77ef3f2f0df8
children 6c6772d3ea31
files src/protocols/yahoo/yahoo.c src/protocols/yahoo/yahoo_filexfer.c src/protocols/yahoo/yahoochat.c
diffstat 3 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Sat Feb 05 17:59:20 2005 +0000
+++ b/src/protocols/yahoo/yahoo.c	Sat Feb 05 18:24:50 2005 +0000
@@ -2151,7 +2151,7 @@
 	const char *sn = gaim_account_get_username(account);
 	const char *pass = gaim_account_get_password(account);
 	GHashTable *hash = yahoo_login_page_hash(buf, len);
-	GString *url = g_string_new("GET /config/login?login=");
+	GString *url = g_string_new("GET http://login.yahoo.com/config/login?login=");
 	char md5[33], *hashp = md5, *chal;
 	int i;
 	md5_byte_t result[16];
--- a/src/protocols/yahoo/yahoo_filexfer.c	Sat Feb 05 17:59:20 2005 +0000
+++ b/src/protocols/yahoo/yahoo_filexfer.c	Sat Feb 05 18:24:50 2005 +0000
@@ -74,7 +74,8 @@
 	xfer->fd = source;
 	gaim_xfer_start(xfer, source, NULL, 0);
 
-	buf = g_strdup_printf("GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n", xd->path, xd->host);
+	buf = g_strdup_printf("GET http://%s:%d/%s HTTP/1.0\r\nHost: %s\r\n\r\n",
+			      xd->host, xd->port, xd->path, xd->host);
 	write(xfer->fd, buf, strlen(buf));
 	g_free(buf);
 
@@ -87,7 +88,7 @@
 	struct yahoo_xfer_data *xd;
 	struct yahoo_packet *pkt;
 	gchar *size, *post, *buf;
-	int content_length;
+	int content_length, port;
 	GaimConnection *gc;
 	GaimAccount *account;
 	struct yahoo_data *yd;
@@ -128,15 +129,16 @@
 
 	buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
 
-	post = g_strdup_printf("POST /notifyft HTTP/1.0\r\n"
+	port = gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT);
+	post = g_strdup_printf("POST http://%s:%d/notifyft HTTP/1.0\r\n"
 	                       "Content-length: %" G_GSIZE_FORMAT "\r\n"
 	                       "Host: %s:%d\r\n"
 	                       "Cookie: %s\r\n"
 	                       "\r\n",
-	                       content_length + 4 + gaim_xfer_get_size(xfer),
 			       gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
-			       gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
-			       buf);
+			       port, content_length + 4 + gaim_xfer_get_size(xfer),
+			       gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
+			       port, buf);
 	write(xfer->fd, post, strlen(post));
 
 	yahoo_packet_send_special(pkt, xfer->fd, 8);
--- a/src/protocols/yahoo/yahoochat.c	Sat Feb 05 17:59:20 2005 +0000
+++ b/src/protocols/yahoo/yahoochat.c	Sat Feb 05 18:24:50 2005 +0000
@@ -1317,7 +1317,8 @@
 	yrl->fd = source;
 
 	cookie = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
-	buf = g_strdup_printf("GET /%s HTTP/1.0\r\nHost: %s\r\nCookie: %s\r\n\r\n", yrl->path, yrl->host, cookie);
+	buf = g_strdup_printf("GET http://%s/%s HTTP/1.0\r\nHost: %s\r\nCookie: %s\r\n\r\n",
+						  yrl->host, yrl->path, yrl->host, cookie);
 	write(yrl->fd, buf, strlen(buf));
 	g_free(cookie);
 	g_free(buf);