changeset 29052:f2a69bee9ef6

Don't send Proxy-Authorization headers until we've received a `407 Proxy Authentication Required` response from the server. Fixes #2910, which has an additional component about using existing kerberos tickets that should be moved to a new trac ticket. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author thecrux@gmail.com
date Sun, 29 Nov 2009 16:14:36 +0000
parents 39a48c780bcb
children c06e1f777e42 c01d4a1c7ee5
files libpurple/proxy.c
diffstat 1 files changed, 0 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/proxy.c	Sun Nov 29 03:19:51 2009 +0000
+++ b/libpurple/proxy.c	Sun Nov 29 16:14:36 2009 +0000
@@ -1099,36 +1099,6 @@
 			connect_data->host, connect_data->port,
 			connect_data->host, connect_data->port);
 
-	if (purple_proxy_info_get_username(connect_data->gpi) != NULL)
-	{
-		char *t1, *t2, *ntlm_type1;
-		char hostname[256];
-
-		ret = gethostname(hostname, sizeof(hostname));
-		hostname[sizeof(hostname) - 1] = '\0';
-		if (ret < 0 || hostname[0] == '\0') {
-			purple_debug_warning("proxy", "gethostname() failed -- is your hostname set?");
-			strcpy(hostname, "localhost");
-		}
-
-		t1 = g_strdup_printf("%s:%s",
-			purple_proxy_info_get_username(connect_data->gpi),
-			purple_proxy_info_get_password(connect_data->gpi) ?
-				purple_proxy_info_get_password(connect_data->gpi) : "");
-		t2 = purple_base64_encode((const guchar *)t1, strlen(t1));
-		g_free(t1);
-
-		ntlm_type1 = purple_ntlm_gen_type1(hostname, "");
-
-		g_string_append_printf(request,
-			"Proxy-Authorization: Basic %s\r\n"
-			"Proxy-Authorization: NTLM %s\r\n"
-			"Proxy-Connection: Keep-Alive\r\n",
-			t2, ntlm_type1);
-		g_free(ntlm_type1);
-		g_free(t2);
-	}
-
 	g_string_append(request, "\r\n");
 
 	connect_data->write_buf_len = request->len;