summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2008-08-27 13:38:28 +0000
committerBastien Nocera <hadess@src.gnome.org>2008-08-27 13:38:28 +0000
commitf978d5afdf151b7d9be65090245a9363b4c48e0f (patch)
tree2b8f262d8871f242fc641257027942c55a8477f4
parent5bd01338b0725822b70957dceff4e43ff5408fa3 (diff)
downloadgvfs-f978d5afdf151b7d9be65090245a9363b4c48e0f.tar.gz
Don't drop query and fragment portions of the URI when decoding it and the
2008-08-27 Bastien Nocera <hadess@hadess.net> * client/gdaemonvfs.c (get_mountspec_from_uri), (_g_daemon_vfs_get_uri_for_mountspec): Don't drop query and fragment portions of the URI when decoding it and the URI scheme isn't handled by any backends (Closes: #549553) svn path=/trunk/; revision=1912
-rw-r--r--ChangeLog8
-rw-r--r--client/gdaemonvfs.c10
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4efda64c..053d035a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-27 Bastien Nocera <hadess@hadess.net>
+
+ * client/gdaemonvfs.c (get_mountspec_from_uri),
+ (_g_daemon_vfs_get_uri_for_mountspec): Don't drop
+ query and fragment portions of the URI when decoding
+ it and the URI scheme isn't handled by any backends
+ (Closes: #549553)
+
2008-08-25 Matthias Clasen <mclasen@redhat.com>
Bug 549253 – error path leaks
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 55d56632..e4f9164a 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -185,7 +185,7 @@ get_mountspec_from_uri (GDaemonVfs *vfs,
if (scheme == NULL)
return FALSE;
- /* convert the scheme to lower case since g_uri_prase_scheme
+ /* convert the scheme to lower case since g_uri_parse_scheme
* doesn't do that and we compare with g_str_equal */
str_tolower_inplace (scheme);
@@ -256,6 +256,11 @@ get_mountspec_from_uri (GDaemonVfs *vfs,
g_mount_spec_set (spec, "port", port);
g_free (port);
}
+
+ if (decoded->query && *decoded->query)
+ g_mount_spec_set (spec, "query", decoded->query);
+ if (decoded->fragment && *decoded->fragment)
+ g_mount_spec_set (spec, "fragment", decoded->fragment);
path = g_strdup (decoded->path);
@@ -499,6 +504,9 @@ _g_daemon_vfs_get_uri_for_mountspec (GMountSpec *spec,
decoded.path = "/";
else
decoded.path = path;
+
+ decoded.query = (char *)g_mount_spec_get (spec, "query");
+ decoded.fragment = (char *)g_mount_spec_get (spec, "fragment");
uri = g_vfs_encode_uri (&decoded, FALSE);