[evolution-data-server] 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] Bug #694734 - Relative URI in Location on PUT confuses WebDAV
- Date: Thu, 28 Feb 2013 18:08:27 +0000 (UTC)
commit 2186c91be1c3920bade5b92c9c5f76e98824b6cf
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 28 19:07:28 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 3938c4c..5f04ae8 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -307,8 +307,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);
@@ -1080,7 +1087,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]