evolution-data-server r9782 - in trunk/calendar: . backends/caldav
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9782 - in trunk/calendar: . backends/caldav
- Date: Fri, 28 Nov 2008 11:15:18 +0000 (UTC)
Author: mcrha
Date: Fri Nov 28 11:15:17 2008
New Revision: 9782
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9782&view=rev
Log:
2008-11-28 Milan Crha <mcrha redhat com>
** Fix for bug #527692
* backends/caldav/e-cal-backend-caldav.c: (caldav_generate_uri),
(initialize_backend): Always append trailing slash to the user
entered URI, it should point to the collection, not to the file.
Modified:
trunk/calendar/ChangeLog
trunk/calendar/backends/caldav/e-cal-backend-caldav.c
Modified: trunk/calendar/backends/caldav/e-cal-backend-caldav.c
==============================================================================
--- trunk/calendar/backends/caldav/e-cal-backend-caldav.c (original)
+++ trunk/calendar/backends/caldav/e-cal-backend-caldav.c Fri Nov 28 11:15:17 2008
@@ -913,8 +913,8 @@
priv = E_CAL_BACKEND_CALDAV_GET_PRIVATE (cbdav);
- /* priv->uri must NOT have trailing slash */
- uri = g_strconcat (priv->uri, "/" , target, NULL);
+ /* priv->uri *have* trailing slash already */
+ uri = g_strconcat (priv->uri, target, NULL);
return uri;
}
@@ -1608,13 +1608,11 @@
}
priv->uri = g_strconcat (proto, uri + 9, NULL);
-
} else {
-
priv->uri = g_strdup (uri);
}
- /* remove trailing slashes */
+ /* remove trailing slashes... */
len = strlen (priv->uri);
while (len--) {
if (priv->uri[len] == '/') {
@@ -1624,6 +1622,15 @@
}
}
+ /* ...and append exactly one slash */
+ if (priv->uri && *priv->uri) {
+ char *tmp = priv->uri;
+
+ priv->uri = g_strconcat (priv->uri, "/", NULL);
+
+ g_free (tmp);
+ }
+
if (priv->cache == NULL) {
ECalSourceType source_type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]