summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Leroy <colin@colino.net>2017-07-21 13:32:31 +0200
committerOndrej Holy <oholy@redhat.com>2017-07-24 15:18:55 +0200
commitad6c120c5b7a100460e893b59b35413fd18bc528 (patch)
tree9a2d0eaf6fdbc90c50a01a64bd2dd65ead6c2dc4
parentc155704092c1848a42539ab91cad9052c38e62af (diff)
downloadgvfs-ad6c120c5b7a100460e893b59b35413fd18bc528.tar.gz
dav: Fix DAV implementation stripping spaces
This patch fixes DAV stripping leading and trailing spaces from server responses. This fixes access to DAV files and directories which names start or end with a space. https://bugzilla.gnome.org/show_bug.cgi?id=785123
-rw-r--r--daemon/gvfsbackendhttp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 6023adda..81ebe27e 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -100,7 +100,7 @@ http_path_get_basename (const char *path)
return NULL;
/* remove any leading slashes */
- while (*path != '\0' && (*path == '/' || *path == ' '))
+ while (*path != '\0' && *path == '/')
path++;
len = strlen (path);
@@ -111,7 +111,7 @@ http_path_get_basename (const char *path)
while (len)
{
char c = path[len - 1];
- if (!g_ascii_isspace (c) && c != '/')
+ if (c != '/')
break;
len--;