+2003-12-18 Dan Winship <danw@ximian.com>
+
+ * libsoup/soup-connection.c (soup_connection_disconnect): Actually
+ disconnect the socket rather than just unreffing it, since the IO
+ code may be holding an extra ref on it.
+ (send_request): connect to the "restarted" signal too
+ (request_restarted): Deal with "Connection: close"
+
+ * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
+ not go into an infinite loop if the server only supports Basic.
+
2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/Makefile.am: install soup-message-queue.h with the rest
g_signal_handlers_disconnect_by_func (conn->priv->socket,
socket_disconnected, conn);
+ soup_socket_disconnect (conn->priv->socket);
g_object_unref (conn->priv->socket);
conn->priv->socket = NULL;
g_signal_emit (conn, signals[DISCONNECTED], 0);
}
static void
+request_restarted (SoupMessage *req, gpointer conn)
+{
+ if (!soup_message_is_keepalive (req))
+ soup_connection_disconnect (conn);
+}
+
+static void
request_done (SoupMessage *req, gpointer user_data)
{
SoupConnection *conn = user_data;
conn->priv->last_used = time (NULL);
conn->priv->in_use = FALSE;
- g_signal_handlers_disconnect_by_func (req, request_done, conn);
-
if (!soup_message_is_keepalive (req))
soup_connection_disconnect (conn);
+
+ g_signal_handlers_disconnect_by_func (req, request_done, conn);
+ g_signal_handlers_disconnect_by_func (req, request_restarted, conn);
}
static void
g_object_add_weak_pointer (G_OBJECT (req),
(gpointer *)conn->priv->cur_req);
+ g_signal_connect (req, "restarted",
+ G_CALLBACK (request_restarted), conn);
g_signal_connect (req, "finished",
G_CALLBACK (request_done), conn);
}