Remove the calls to soup_message_io_stop() here; the corresponding calls
authorDan Winship <danw@src.gnome.org>
Tue, 5 Dec 2006 18:37:16 +0000 (18:37 +0000)
committerDan Winship <danw@src.gnome.org>
Tue, 5 Dec 2006 18:37:16 +0000 (18:37 +0000)
* 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
libsoup/soup-message-io.c
libsoup/soup-message.c

index 76e0122..cc003fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-12-05  Dan Winship  <danw@novell.com>
+
+       * 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  <danw@novell.com>
 
        * configure.in: 2.2.98
index 22447dd..a0ec59f 100644 (file)
@@ -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)
index ac16aa0..907b5ee 100644 (file)
@@ -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);