[evolution-patches] soup redirection patch



soup currently goes into an infinite loop if you redirect it to another
machine (at least if you're using NTLM auth. Maybe it doesn't happen
with normal auth?)

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libsoup/ChangeLog,v
retrieving revision 1.286
diff -u -r1.286 ChangeLog
--- ChangeLog	24 Mar 2003 15:38:55 -0000	1.286
+++ ChangeLog	28 Mar 2003 21:22:46 -0000
@@ -1,3 +1,10 @@
+2003-03-28  Dan Winship  <danw ximian com>
+
+	* libsoup/soup-message.c (soup_message_set_context): If the new
+	context points to a different server from the old context, call
+	soup_message_cleanup. Otherwise it tries to reuse the old
+	connection...
+
 2003-03-24  Joe Shaw  <joe ximian com>
 
 	* soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
Index: libsoup/soup-message.c
===================================================================
RCS file: /cvs/gnome/libsoup/libsoup/soup-message.c,v
retrieving revision 1.52
diff -u -r1.52 soup-message.c
--- libsoup/soup-message.c	18 Nov 2002 15:26:19 -0000	1.52
+++ libsoup/soup-message.c	28 Mar 2003 21:22:47 -0000
@@ -1184,8 +1184,12 @@
 {
 	g_return_if_fail (msg != NULL);
 
-	if (msg->context)
+	if (msg->context) {
+		if (msg->connection &&
+		    (!new_ctx || (msg->context->server != new_ctx->server)))
+			soup_message_cleanup (msg);
 		soup_context_unref (msg->context);
+	}
 
 	if (new_ctx)
 		soup_context_ref (new_ctx);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]