Index: client/gdaemonvfs.h
===================================================================
--- client/gdaemonvfs.h	(revision 1207)
+++ client/gdaemonvfs.h	(working copy)
@@ -60,6 +60,9 @@
 GMountInfo *    _g_daemon_vfs_get_mount_info_sync      (GMountSpec               *spec,
 							const char               *path,
 							GError                  **error);
+GMountSpec *    _g_daemon_vfs_get_mount_spec_for_path  (GMountSpec               *spec,
+						        const char               *path,
+						        const char               *new_path);
 void            _g_daemon_vfs_invalidate_dbus_id       (const char               *dbus_id);
 DBusConnection *_g_daemon_vfs_get_async_bus            (void);
 
Index: client/httpuri.c
===================================================================
--- client/httpuri.c	(revision 1207)
+++ client/httpuri.c	(working copy)
@@ -75,9 +75,20 @@
 
   if (!g_ascii_strncasecmp (uri_str, "http", 4))
     {
+      GDecodedUri *uri;
+
+      uri = g_vfs_decode_uri (uri_str);
+
+      if (uri == NULL)
+          return NULL;
+
       info = g_vfs_uri_mount_info_new ("http");
       g_vfs_uri_mount_info_set (info, "uri", uri_str);
-      path = g_strdup ("/");
+
+      path = uri->path;
+      uri->path = NULL;
+      
+      g_vfs_decoded_uri_free (uri);
     }
   else
     {
@@ -116,6 +127,60 @@
   return info;
 }
 
+static GVfsUriMountInfo *
+http_get_mount_info_for_path (GVfsUriMapper *mapper,
+			      GVfsUriMountInfo *info,
+			      const char *new_path)
+{
+  const char *type;
+
+  type = g_vfs_uri_mount_info_get (info, "type");
+
+  if (strcmp (type, "http") == 0)
+    {
+      const char *uri_str;
+      char *new_uri;
+      GDecodedUri *uri;
+      GVfsUriMountInfo *new_info;
+
+      uri_str = g_vfs_uri_mount_info_get (info, "uri");
+
+      uri = g_vfs_decode_uri (uri_str);
+
+      if (uri == NULL)
+          return NULL;
+
+      if (strcmp (uri->path, new_path) == 0)
+	{
+	  g_vfs_decoded_uri_free (uri);
+	  return NULL;
+	}
+
+      g_free (uri->path);
+      uri->path = g_strdup (new_path);
+
+      g_free (uri->query);
+      uri->query = NULL;
+
+      g_free (uri->fragment);
+      uri->fragment = NULL;
+
+      new_info = g_vfs_uri_mount_info_new ("http");
+
+      new_uri = g_vfs_encode_uri (uri, TRUE);
+      g_vfs_uri_mount_info_set (new_info, "uri", new_uri);
+      g_free (new_uri);
+
+      uri->path = NULL;
+
+      g_vfs_decoded_uri_free (uri);
+
+      return new_info;
+    }
+  else
+    return NULL;
+}
+
 static const char * const *
 http_get_handled_mount_types (GVfsUriMapper *mapper)
 {
@@ -228,6 +293,7 @@
   mapper_class = G_VFS_URI_MAPPER_CLASS (class);
   mapper_class->get_handled_schemes     = http_get_handled_schemes;
   mapper_class->from_uri                = http_from_uri;
+  mapper_class->get_mount_info_for_path = http_get_mount_info_for_path;
   mapper_class->get_handled_mount_types = http_get_handled_mount_types;
   mapper_class->to_uri                  = http_to_uri;
   mapper_class->to_uri_scheme           = http_to_uri_scheme;
Index: client/gvfsurimapper.h
===================================================================
--- client/gvfsurimapper.h	(revision 1207)
+++ client/gvfsurimapper.h	(working copy)
@@ -61,7 +61,10 @@
   const char * const * (*get_handled_schemes)     (GVfsUriMapper *mapper);
   GVfsUriMountInfo *   (*from_uri)                (GVfsUriMapper *mapper,
 					           const char *uri);
-  
+  GVfsUriMountInfo *   (*get_mount_info_for_path) (GVfsUriMapper *mapper,
+						   GVfsUriMountInfo *mount_info,
+					           const char *new_path);
+
   const char * const * (*get_handled_mount_types) (GVfsUriMapper *mapper);
   char *               (*to_uri)                  (GVfsUriMapper *mapper,
 					           GVfsUriMountInfo *mount_info,
@@ -88,6 +91,9 @@
 const char * const *g_vfs_uri_mapper_get_handled_schemes     (GVfsUriMapper    *mapper);
 GVfsUriMountInfo *  g_vfs_uri_mapper_from_uri                (GVfsUriMapper    *mapper,
 							      const char       *uri);
+GVfsUriMountInfo *  g_vfs_uri_mapper_get_mount_info_for_path (GVfsUriMapper    *mapper,
+							      GVfsUriMountInfo *mount_info,
+							      const char       *new_path);
 
 const char * const *g_vfs_uri_mapper_get_handled_mount_types (GVfsUriMapper    *mapper);
 char *              g_vfs_uri_mapper_to_uri                  (GVfsUriMapper    *mapper,
Index: client/gdaemonfile.c
===================================================================
--- client/gdaemonfile.c	(revision 1207)
+++ client/gdaemonfile.c	(working copy)
@@ -262,11 +262,28 @@
 }
 
 static GFile *
+new_file_for_new_path (GDaemonFile *daemon_file,
+		       const char *new_path)
+{
+  GFile *new_file;
+  GMountSpec *new_spec;
+
+  new_spec = _g_daemon_vfs_get_mount_spec_for_path (daemon_file->mount_spec,
+						    daemon_file->path,
+						    new_path);
+
+  new_file = g_daemon_file_new (new_spec, new_path);
+  g_mount_spec_unref (new_spec);
+
+  return new_file;
+}
+
+static GFile *
 g_daemon_file_get_parent (GFile *file)
 {
   GDaemonFile *daemon_file = G_DAEMON_FILE (file);
   const char *path;
-  GDaemonFile *parent;
+  GFile *parent;
   const char *base;
   char *parent_path;
   gsize len;    
@@ -286,11 +303,10 @@
   g_memmove (parent_path, path, len);
   parent_path[len] = 0;
 
-  parent = g_object_new (G_TYPE_DAEMON_FILE, NULL);
-  parent->mount_spec = g_mount_spec_ref (daemon_file->mount_spec);
-  parent->path = parent_path;
+  parent = new_file_for_new_path (daemon_file, parent_path);
+  g_free (parent_path);
   
-  return G_FILE (parent);
+  return parent;
 }
 
 static GFile *
@@ -387,10 +403,10 @@
   GFile *child;
 
   if (*relative_path == '/')
-    return g_daemon_file_new (daemon_file->mount_spec, relative_path);
-  
+    return new_file_for_new_path (daemon_file, relative_path);
+
   path = g_build_path ("/", daemon_file->path, relative_path, NULL);
-  child = g_daemon_file_new (daemon_file->mount_spec, path);
+  child = new_file_for_new_path (daemon_file, path);
   g_free (path);
   
   return child;
@@ -1642,7 +1658,7 @@
       goto out;
     }
 
-  file = g_daemon_file_new (daemon_file->mount_spec, new_path);
+  file = new_file_for_new_path (daemon_file, new_path);
   g_free (new_path);
 
  out:
Index: client/gdaemonvfs.c
===================================================================
--- client/gdaemonvfs.c	(revision 1207)
+++ client/gdaemonvfs.c	(working copy)
@@ -282,6 +282,43 @@
   return g_vfs_get_file_for_uri (G_DAEMON_VFS (vfs)->wrapped_vfs, uri);
 }
 
+GMountSpec *
+_g_daemon_vfs_get_mount_spec_for_path (GMountSpec *spec,
+				       const char *path,
+				       const char *new_path)
+{
+  const char *type;
+  GVfsUriMapper *mapper;
+  GMountSpec *new_spec;
+
+  type = g_mount_spec_get_type (spec);
+
+  if (type == NULL)
+    return g_mount_spec_ref (spec);
+
+  mapper = g_hash_table_lookup (the_vfs->to_uri_hash, type);
+  if (mapper)
+    {
+      GVfsUriMountInfo info, *new_info;
+      info.keys = spec->items;
+      info.path = path;
+      new_info = g_vfs_uri_mapper_get_mount_info_for_path (mapper, &info, new_path);
+      if (new_info != NULL)
+	{
+	  new_spec = g_mount_spec_new_from_data (new_info->keys, NULL);
+	  /* We took over ownership, custom free: */
+	  if (new_info->path != new_path)
+	    g_free (new_info->path);
+	  g_free (new_info);
+	}
+    }
+
+  if (new_spec == NULL)
+    new_spec = g_mount_spec_ref (spec);
+
+  return new_spec;
+}
+
 char *
 _g_daemon_vfs_get_uri_for_mountspec (GMountSpec *spec,
 				     char *path,
Index: client/gvfsurimapper.c
===================================================================
--- client/gvfsurimapper.c	(revision 1207)
+++ client/gvfsurimapper.c	(working copy)
@@ -170,6 +170,21 @@
   return (* class->from_uri) (mapper, uri);
 }
 
+GVfsUriMountInfo *
+g_vfs_uri_mapper_get_mount_info_for_path (GVfsUriMapper    *mapper,
+					  GVfsUriMountInfo *info,
+					  const char       *new_path)
+{
+  GVfsUriMapperClass *class;
+
+  class = G_VFS_URI_MAPPER_GET_CLASS (mapper);
+
+  if (class->get_mount_info_for_path != NULL)
+    return (* class->get_mount_info_for_path) (mapper, info, new_path);
+  else
+    return NULL;
+}
+
 const char * const *
 g_vfs_uri_mapper_get_handled_mount_types (GVfsUriMapper  *mapper)
 {
