After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 561515 - DAV: Does not properly encode URLs (thus URL with reserved chars, e.g. spaces, will break)
DAV: Does not properly encode URLs (thus URL with reserved chars, e.g. spaces...
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: webdav backend
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: Christian Kellner
gvfs-maint
: 572429 625405 628716 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-19 14:05 UTC by Vincent Untz
Modified: 2011-05-14 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Encode URI during mount (932 bytes, patch)
2011-05-09 22:04 UTC, Christian Kellner
none Details | Review

Description Vincent Untz 2008-11-19 14:05:07 UTC
Forwarding https://bugzilla.novell.com/show_bug.cgi?id=444148 :

I'm using Nautilus to access our SharePoint's Document Store.

This all works fine, as long as the URL does not contain spaces.
If a URL contains a space (%20), nautilus bails out with:

Error: Response invalid
Please select another viewer and try again.

Is there any additional debug I can provide ?
Comment 1 awilliam 2010-03-23 19:28:39 UTC
Possibly Bug#561515, Bug#572429, and Bug#455585 are all related or duplicates?

Having written a DAV server, and tested primarily with Nautilus, I can certainly say that it does not deal with escaped characters in the URL gracefully.
Comment 2 Christian Kellner 2011-05-09 21:36:15 UTC
*** Bug 625405 has been marked as a duplicate of this bug. ***
Comment 3 Christian Kellner 2011-05-09 21:39:13 UTC
We first decode the uri first (as does the smb backend) but then during mount we never re-encode the uri again. This leading to the problem that one cannot mount urls that contain spaces nor their escaped version.
Comment 4 Christian Kellner 2011-05-09 22:04:50 UTC
Created attachment 187532 [details] [review]
Encode URI during mount

My first take on this. I am not sure G_URI_RESERVED_CHARS_ALLOWED_IN_PATH is the correct value to pass to g_uri_escape_string () though. Needs more thinking tomorrow.
Comment 5 Christian Kellner 2011-05-14 10:05:03 UTC
*** Bug 572429 has been marked as a duplicate of this bug. ***
Comment 6 Christian Kellner 2011-05-14 10:06:28 UTC
*** Bug 628716 has been marked as a duplicate of this bug. ***
Comment 7 Christian Kellner 2011-05-14 10:17:00 UTC
I have committed a fix for this problem to git master:

commit 6e2f679f73db38f55073119989de9b33ba265540
Author: Christian Kellner <gicmo@gnome.org>
Date:   Sat May 14 12:12:53 2011 +0200

    dav: Correctly encode URLs
    
    Up until now we decode the URL in the URI-mapper on the client side
    but never re-encoded it before sending it to the server. We now do
    encode the initial mount_base in do_mount () and then append encoded
    filenames to this. Fixes bug 561515.