late tarball request: DAAP sharing in rhythmbox broken with libsoup 2.24.0



A bug fix that went into libsoup 2.23.91 apparently breaks DAAP music
sharing between rhythmbox and iTunes, making rhythmbox crash if an
iTunes user tries to browse its music:

  http://bugzilla.gnome.org/show_bug.cgi?id=553466

(The bug mentions Windows, but it's broken with OS X too.)

Given that:

    1) DAAP is a cool feature and having it crash rhythmbox in GNOME
       2.24 would suck

    2) The bug that was allegedly fixed by the bad patch in libsoup
       2.23.91 is obscure, and it's possible that the fix just moved a
       crash from one part of the program to another anyway (see
       http://bugzilla.gnome.org/show_bug.cgi?id=528882)

    3) Nothing else would be hurt if the bad patch was reverted

I'd like to revert the bad patch and put out libsoup 2.24.0.1 before
GNOME 2.24.0 goes out.

Proposed patch attached. You can compare with the original commit at
http://svn.gnome.org/viewvc/libsoup?view=revision&revision=1155. This
reverts the soup-message.c and soup-session.c portions in their
entirety, but leaves the soup-uri.h part there, in case anyone actually
managed to use the new #define between then and now. (It also leaves the
soup-uri.c part there, but it's pretty clear that the old and new code
do exactly the same thing.) I've confirmed that the patch fixes 553466.

The patch is not yet committed, but there's already a
libsoup-2.24.0.1.tar.gz built with it in my homedir on master.gnome.org,
ready to be install-moduled.

-- Dan
Index: configure.in
===================================================================
--- configure.in	(revision 1161)
+++ configure.in	(working copy)
@@ -3,7 +3,7 @@ dnl *** Initialize automake and set vers
 dnl *******************************************
 
 AC_PREREQ(2.53)
-AC_INIT(libsoup, 2.24.0)
+AC_INIT(libsoup, 2.24.0.1)
 AC_CONFIG_SRCDIR(libsoup.pc.in)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1161)
+++ ChangeLog	(working copy)
@@ -1,3 +1,15 @@
+2008-09-23  Dan Winship  <danw gnome org>
+
+	* configure.in: 2.24.0.1
+
+	* NEWS: Update
+
+	* libsoup/soup-session.c (redirect_handler):
+	* libsoup/soup-message.c (soup_message_new):
+	(soup_message_new_from_uri, soup_message_set_uri): Revert the
+	2008-08-25 change; it breaks the rhythmbox DAAP plugin. #553466.
+	To be revisited.
+
 2008-09-22  Dan Winship  <danw gnome org>
 
 	* configure.in: 2.24.0
Index: NEWS
===================================================================
--- NEWS	(revision 1160)
+++ NEWS	(working copy)
@@ -1,3 +1,8 @@
+Changes in libsoup from 2.23.92 to 2.24.0.1:
+
+	* Reverted part of the fix for #528882, which caused the DAAP
+          plugin in rhythmbox to crash. [#553466]
+
 Changes in libsoup from 2.23.91 to 2.23.92:
 
 	* Fixed the handling of a 302 response to a HEAD request,
Index: libsoup/soup-session.c
===================================================================
--- libsoup/soup-session.c	(revision 1160)
+++ libsoup/soup-session.c	(working copy)
@@ -819,9 +819,7 @@ redirect_handler (SoupMessage *msg, gpoi
 	 * are lame, so we use soup_uri_new_with_base().
 	 */
 	new_uri = soup_uri_new_with_base (soup_message_get_uri (msg), new_loc);
-	if (!SOUP_URI_VALID_FOR_HTTP (new_uri)) {
-		if (new_uri)
-			soup_uri_free (new_uri);
+	if (!new_uri) {
 		soup_message_set_status_full (msg,
 					      SOUP_STATUS_MALFORMED,
 					      "Invalid Redirect URL");
Index: libsoup/soup-message.c
===================================================================
--- libsoup/soup-message.c	(revision 1160)
+++ libsoup/soup-message.c	(working copy)
@@ -554,7 +554,7 @@ get_property (GObject *object, guint pro
  * Creates a new empty #SoupMessage, which will connect to @uri
  *
  * Return value: the new #SoupMessage (or %NULL if @uri could not
- * be parsed or is not a valid HTTP/HTTPS URI).
+ * be parsed).
  */
 SoupMessage *
 soup_message_new (const char *method, const char *uri_string)
@@ -568,6 +568,10 @@ soup_message_new (const char *method, co
 	uri = soup_uri_new (uri_string);
 	if (!uri)
 		return NULL;
+	if (!uri->host) {
+		soup_uri_free (uri);
+		return NULL;
+	}
 
 	msg = soup_message_new_from_uri (method, uri);
 	soup_uri_free (uri);
@@ -579,20 +583,13 @@ soup_message_new (const char *method, co
  * @method: the HTTP method for the created request
  * @uri: the destination endpoint (as a #SoupURI)
  * 
- * Creates a new empty #SoupMessage, which will connect to @uri.
+ * Creates a new empty #SoupMessage, which will connect to @uri
  *
- * Return value: the new #SoupMessage (or %NULL if @uri is not a
- * valid HTTP/HTTPS URI)
+ * Return value: the new #SoupMessage
  */
 SoupMessage *
 soup_message_new_from_uri (const char *method, SoupURI *uri)
 {
-	g_return_val_if_fail (method != NULL, NULL);
-	g_return_val_if_fail (uri != NULL, NULL);
-
-	if (!SOUP_URI_VALID_FOR_HTTP (uri))
-		return NULL;
-
 	return g_object_new (SOUP_TYPE_MESSAGE,
 			     SOUP_MESSAGE_METHOD, method,
 			     SOUP_MESSAGE_URI, uri,
@@ -1269,9 +1266,8 @@ soup_message_is_keepalive (SoupMessage *
  * @msg: a #SoupMessage
  * @uri: the new #SoupURI
  *
- * Sets @msg's URI to @uri, which must be a valid HTTP/HTTPS URI (per
- * SOUP_URI_VALID_FOR_HTTP()). If @msg has already been sent and you
- * want to re-send it with the new URI, you need to call
+ * 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
@@ -1280,9 +1276,8 @@ soup_message_set_uri (SoupMessage *msg, 
 	SoupMessagePrivate *priv;
 
 	g_return_if_fail (SOUP_IS_MESSAGE (msg));
-	g_return_if_fail (SOUP_URI_VALID_FOR_HTTP (uri));
-
 	priv = SOUP_MESSAGE_GET_PRIVATE (msg);
+
 	if (priv->uri)
 		soup_uri_free (priv->uri);
 	priv->uri = soup_uri_copy (uri);


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