--- old-pie/podcast/rb-podcast-manager.c	2006-08-04 09:04:19.000000000 +1000
+++ new-pie/podcast/rb-podcast-manager.c	2006-08-04 09:04:19.000000000 +1000
@@ -557,6 +557,7 @@ rb_podcast_manager_copy_post (RBPodcastM
 	char *dir_name, *conf_dir_name;
 	RBPodcastManagerInfo *data = NULL;
 	RhythmDBEntry *entry;
+	char *query_string;
 
 	rb_debug ("Stating copy file");
 	g_value_init (&location_val, G_TYPE_STRING);
@@ -578,7 +579,32 @@ rb_podcast_manager_copy_post (RBPodcastM
 
 	rb_debug ("processing %s", location);
 
-	remote_uri = gnome_vfs_uri_new (location);
+	/* gnome-vfs currently doesn't handle HTTP query strings correctly.
+	 * so we do it ourselves.
+	 */
+	query_string = strrchr (location, '?');
+	if (query_string != NULL) {
+		char *base_uri;
+
+		base_uri = g_strdup (location);
+		query_string = strrchr (base_uri, '?');
+		*query_string++ = '\0';
+		rb_debug ("hiding query string %s from gnome-vfs", query_string);
+
+		remote_uri = gnome_vfs_uri_new (base_uri);
+		if (remote_uri != NULL) {
+			char *full_uri;
+			
+			full_uri = g_strdup_printf ("%s?%s", 
+						    remote_uri->text,
+						    query_string);
+			g_free (data->read_uri->text);
+			remote_uri->text = full_uri;
+		}
+		g_free (base_uri);
+	} else {
+		remote_uri = gnome_vfs_uri_new (location);
+	}
 	if (!remote_uri) {
 		rb_debug ("Error downloading podcast: could not create remote uri");
 		goto next_step;

