diff options
author | Dan Winship <danw@src.gnome.org> | 2004-04-15 17:33:23 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2004-04-15 17:33:23 +0000 |
commit | 77cdfc03f7db7c20ac4981f35b11c691425d44c1 (patch) | |
tree | 9199fcd6c70fb297f4024cf5084e0de277020dd9 | |
parent | 98be27445dd9ee43f2e388a793cb7e33542c5fde (diff) | |
download | libsoup-77cdfc03f7db7c20ac4981f35b11c691425d44c1.tar.gz |
Connect to the socket's "disconnect" signal. (We were only doing this from
* libsoup/soup-connection.c (soup_connection_connect_sync):
Connect to the socket's "disconnect" signal. (We were only doing
this from the async version before, which meant that synchronous
SoupConnections could outlive their sockets and start causing
errors.) #57004
* libsoup/soup-connection-ntlm.c (send_request): Remove the old
Authorization header before adding a new one.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | libsoup/soup-connection-ntlm.c | 2 | ||||
-rw-r--r-- | libsoup/soup-connection.c | 3 |
3 files changed, 16 insertions, 0 deletions
@@ -1,3 +1,14 @@ +2004-04-15 Dan Winship <danw@ximian.com> + + * libsoup/soup-connection.c (soup_connection_connect_sync): + Connect to the socket's "disconnect" signal. (We were only doing + this from the async version before, which meant that synchronous + SoupConnections could outlive their sockets and start causing + errors.) #57004 + + * libsoup/soup-connection-ntlm.c (send_request): Remove the old + Authorization header before adding a new one. + 2004-04-02 JP Rosevear <jpr@ximian.com> * configure.in: bump version, libtool number diff --git a/libsoup/soup-connection-ntlm.c b/libsoup/soup-connection-ntlm.c index 14ccf123..d49e1c5a 100644 --- a/libsoup/soup-connection-ntlm.c +++ b/libsoup/soup-connection-ntlm.c @@ -177,6 +177,8 @@ send_request (SoupConnection *conn, SoupMessage *req) if (ntlm->priv->state == SOUP_CONNECTION_NTLM_NEW) { char *header = soup_ntlm_request (); + soup_message_remove_header (req->request_headers, + "Authorization"); soup_message_add_header (req->request_headers, "Authorization", header); g_free (header); diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index 9ab792b2..2d736c74 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -488,6 +488,9 @@ soup_connection_connect_sync (SoupConnection *conn) if (!SOUP_STATUS_IS_SUCCESSFUL (status)) goto fail; + g_signal_connect (conn->priv->socket, "disconnected", + G_CALLBACK (socket_disconnected), conn); + if (conn->priv->conn_uri->protocol == SOUP_PROTOCOL_HTTPS) { if (!soup_socket_start_ssl (conn->priv->socket)) { status = SOUP_STATUS_SSL_FAILED; |