[evolution-data-server/gnome-3-6] Bug #694734 - Relative URI in Location on PUT confuses WebDAV
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-6] Bug #694734 - Relative URI in Location on PUT confuses WebDAV
- Date: Thu, 28 Feb 2013 18:09:08 +0000 (UTC)
commit f1a6b21f727c076a880ac73ee3b5ef5e1b527cdf
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 28 19:08:31 2013 +0100
Bug #694734 - Relative URI in Location on PUT confuses WebDAV
.../backends/webdav/e-book-backend-webdav.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c
b/addressbook/backends/webdav/e-book-backend-webdav.c
index 0b3410c..f124b79 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -261,8 +261,15 @@ upload_contact (EBookBackendWebdav *webdav,
SoupURI *suri = soup_uri_new (uri);
gchar *full_uri;
- soup_uri_set_path (suri, redir_uri);
- full_uri = soup_uri_to_string (suri, TRUE);
+ if (*redir_uri != '/' && *redir_uri != '\\') {
+ gchar *slashed_path = g_strconcat ("/", redir_uri, NULL);
+
+ soup_uri_set_path (suri, slashed_path);
+ g_free (slashed_path);
+ } else {
+ soup_uri_set_path (suri, redir_uri);
+ }
+ full_uri = soup_uri_to_string (suri, FALSE);
e_contact_set (contact, E_CONTACT_UID, full_uri);
@@ -1030,7 +1037,7 @@ download_contacts (EBookBackendWebdav *webdav,
SoupURI *soup_uri = soup_uri_new (priv->uri);
soup_uri->path = g_strdup (uri);
- complete_uri = soup_uri_to_string (soup_uri, 0);
+ complete_uri = soup_uri_to_string (soup_uri, FALSE);
soup_uri_free (soup_uri);
} else {
complete_uri = g_strdup (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]