[gvfs/wip/oholy/http-unescape-prefix] http: Unescape prefix to fix handling of encoded URIs




commit 34420e33ead1dff90a766258698b5e5a29acae43
Author: Ondrej Holy <oholy redhat com>
Date:   Mon May 2 11:04:36 2022 +0200

    http: Unescape prefix to fix handling of encoded URIs
    
    Currently, the HTTP backend fails with the "The specified location is
    not mounted" error for URIs with path containing escaped characters.
    This is because the mount prefix is not unescaped. This is unfortunatelly
    another libsoup3 port regression. Let's correctly unescape the prefix to
    make that work again.
    
    Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/623

 daemon/gvfsbackendhttp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 0f01d213..e8e44004 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -307,7 +307,7 @@ try_mount (GVfsBackend  *backend,
   real_mount_spec = g_mount_spec_new ("http");
   g_mount_spec_set (real_mount_spec, "uri", uri_str);
 
-  path = g_uri_get_path (uri);
+  path = g_uri_unescape_string (g_uri_get_path (uri), "/");
   if (path[0])
     {
       g_free (real_mount_spec->mount_prefix);


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