[gvfs] dav: correctly handle usernames supplied in the url
- From: Christian Kellner <gicmo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] dav: correctly handle usernames supplied in the url
- Date: Sun, 8 May 2011 10:21:02 +0000 (UTC)
commit a2a2fe70666618062148f5cbf0ca5e7f1eedfa0a
Author: Christian Kellner <gicmo gnome org>
Date: Sun May 8 12:17:38 2011 +0200
dav: correctly handle usernames supplied in the url
When comparing URIs in dav_uri_match() do not take username or
password into account because on a redirect the server is likely to not
include the username in the url supplied in the Location header.
Therefore redirection will fail and thus mounting.
Should fix bug 586248. Patch based on a version from Henrik Holst.
daemon/gvfsbackenddav.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index d63059f..9e75ded 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -250,16 +250,15 @@ path_equal (const char *a, const char *b, gboolean relax)
static gboolean
dav_uri_match (SoupURI *a, SoupURI *b, gboolean relax)
{
- if (a->scheme != b->scheme ||
- a->port != b->port ||
- ! str_equal (a->user, b->user, FALSE) ||
- ! str_equal (a->password, b->password, FALSE) ||
- ! str_equal (a->host, b->host, TRUE) ||
- ! path_equal (a->path, b->path, relax) ||
- ! str_equal (a->query, b->query, FALSE) ||
- ! str_equal (a->fragment, b->fragment, FALSE))
- return FALSE;
- return TRUE;
+ gboolean diff;
+
+ diff = a->scheme != b->scheme || a->port != b->port ||
+ ! str_equal (a->host, b->host, TRUE) ||
+ ! path_equal (a->path, b->path, relax) ||
+ ! str_equal (a->query, b->query, FALSE) ||
+ ! str_equal (a->fragment, b->fragment, FALSE);
+
+ return !diff;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]