# HG changeset patch
# User Mark Doliner <mark@kingant.net>
# Date 1228527528 0
# Node ID 9fb7910c1176bef3293a5f3ad7ebf6413adc2a55
# Parent  104f6f755c7e5dcd39c63d4935d7d76c4acd69bb
Add a debug line and remove a duplicate "login=" get parameter which
was causing yahoo's servers to give us an HTTP 400 error, which is
technically probably not valid according to http 1.1

diff -r 104f6f755c7e -r 9fb7910c1176 libpurple/protocols/yahoo/yahoo.c
--- a/libpurple/protocols/yahoo/yahoo.c	Sat Dec 06 01:08:20 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Sat Dec 06 01:38:48 2008 +0000
@@ -2706,6 +2706,7 @@
 			  strncmp(buf, "HTTP/1.1 302", strlen("HTTP/1.1 302")))) {
 		purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 			_("Received unexpected HTTP response from server."));
+		purple_debug_misc("yahoo", "Unexpected HTTP response: %s\n", buf);
 		return;
 	}
 
@@ -2802,7 +2803,7 @@
 
 static void yahoo_login_page_hash_iter(const char *key, const char *val, GString *url)
 {
-	if (!strcmp(key, "passwd"))
+	if (!strcmp(key, "passwd") || !strcmp(key, "login"))
 		return;
 	g_string_append_c(url, '&');
 	g_string_append(url, key);