From 9627a1837bff8be8e6d447a9ebad500b5320d2dd Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 5 Dec 2006 18:37:16 +0000 Subject: [PATCH] Remove the calls to soup_message_io_stop() here; the corresponding calls * libsoup/soup-message.c (soup_message_set_uri): Remove the calls to soup_message_io_stop() here; the corresponding calls were needed back in the SoupContext days, but they are wrong now and cause async-redirects-to-other-hosts to fail. #382251. Also clarify docs with respect to soup_session_requeue_message(). * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs --- ChangeLog | 10 ++++++++++ libsoup/soup-message-io.c | 4 ++++ libsoup/soup-message.c | 11 +++-------- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76e0122..cc003fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-12-05 Dan Winship + + * libsoup/soup-message.c (soup_message_set_uri): Remove the calls + to soup_message_io_stop() here; the corresponding calls were + needed back in the SoupContext days, but they are wrong now and + cause async-redirects-to-other-hosts to fail. #382251. Also + clarify docs with respect to soup_session_requeue_message(). + + * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs + 2006-11-20 Dan Winship * configure.in: 2.2.98 diff --git a/libsoup/soup-message-io.c b/libsoup/soup-message-io.c index 22447dd..a0ec59f 100644 --- a/libsoup/soup-message-io.c +++ b/libsoup/soup-message-io.c @@ -110,6 +110,10 @@ io_cleanup (SoupMessage *msg) * * Immediately stops I/O on msg; if the connection would be left in an * inconsistent state, it will be closed. + * + * Note: this is a low-level function that does not cause any signals + * to be emitted on @msg; it is up to the caller to make sure that + * @msg doesn't get "stranded". **/ void soup_message_io_stop (SoupMessage *msg) diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c index ac16aa0..907b5ee 100644 --- a/libsoup/soup-message.c +++ b/libsoup/soup-message.c @@ -871,8 +871,9 @@ soup_message_is_keepalive (SoupMessage *msg) * @msg: a #SoupMessage * @uri: the new #SoupUri * - * Changes the URI that @msg is directed to (generally as a result - * of a redirect). + * Sets @msg's URI to @uri. If @msg has already been sent and you want + * to re-send it with the new URI, you need to call + * soup_session_requeue_message(). **/ void soup_message_set_uri (SoupMessage *msg, const SoupUri *uri) @@ -882,12 +883,6 @@ soup_message_set_uri (SoupMessage *msg, const SoupUri *uri) g_return_if_fail (SOUP_IS_MESSAGE (msg)); priv = SOUP_MESSAGE_GET_PRIVATE (msg); - if (priv->uri && uri) { - if (strcmp (priv->uri->host, uri->host) != 0) - soup_message_io_stop (msg); - } else if (!uri) - soup_message_io_stop (msg); - if (priv->uri) soup_uri_free (priv->uri); priv->uri = soup_uri_copy (uri); -- 2.7.4