[evolution/gnome-3-6] Bug #663844 - [CalDAV] calendar-home-set/href may contain full URI
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-6] Bug #663844 - [CalDAV] calendar-home-set/href may contain full URI
- Date: Mon, 15 Oct 2012 17:11:25 +0000 (UTC)
commit d731853d3f78a3989c0bf1123065088a1ebe864b
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 15 19:10:58 2012 +0200
Bug #663844 - [CalDAV] calendar-home-set/href may contain full URI
modules/cal-config-caldav/e-caldav-chooser.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/modules/cal-config-caldav/e-caldav-chooser.c b/modules/cal-config-caldav/e-caldav-chooser.c
index fa5c9b7..b4c51a9 100644
--- a/modules/cal-config-caldav/e-caldav-chooser.c
+++ b/modules/cal-config-caldav/e-caldav-chooser.c
@@ -99,7 +99,7 @@ static void e_caldav_chooser_authenticator_init
static void caldav_chooser_get_collection_details
(SoupSession *session,
SoupMessage *message,
- const gchar *path,
+ const gchar *path_or_uri,
GSimpleAsyncResult *simple);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (
@@ -884,13 +884,25 @@ exit:
static void
caldav_chooser_get_collection_details (SoupSession *session,
SoupMessage *message,
- const gchar *path,
+ const gchar *path_or_uri,
GSimpleAsyncResult *simple)
{
SoupURI *soup_uri;
- soup_uri = soup_uri_copy (soup_message_get_uri (message));
- soup_uri_set_path (soup_uri, path);
+ soup_uri = soup_uri_new (path_or_uri);
+ if (!soup_uri ||
+ !soup_uri_get_scheme (soup_uri) ||
+ !soup_uri_get_host (soup_uri) ||
+ !soup_uri_get_path (soup_uri) ||
+ !*soup_uri_get_scheme (soup_uri) ||
+ !*soup_uri_get_host (soup_uri) ||
+ !*soup_uri_get_path (soup_uri)) {
+ /* it's a path only, not full uri */
+ if (soup_uri)
+ soup_uri_free (soup_uri);
+ soup_uri = soup_uri_copy (soup_message_get_uri (message));
+ soup_uri_set_path (soup_uri, path_or_uri);
+ }
message = caldav_chooser_new_propfind (
session, soup_uri, DEPTH_1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]