Was [Re: [evolution-patches] itip-formatter plugin invocation URI fix.]
- From: Veerapuram Varadhan <vvaradhan novell com>
- To: evo-patches <evolution-patches lists ximian com>
- Subject: Was [Re: [evolution-patches] itip-formatter plugin invocation URI fix.]
- Date: Fri, 08 Jul 2005 01:45:53 +0530
Hi,
Attached patch makes the itip-formatter plugin to work. It fixes a bug
in the URL parser that expected the optional fields to be mandatory with
atleast no values.
Kindly let me know your comments/suggestions.
TIA,
V. Varadhan
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.273
diff -u -p -r1.273 ChangeLog
--- ChangeLog 22 Jun 2005 12:24:03 -0000 1.273
+++ ChangeLog 7 Jul 2005 20:09:09 -0000
@@ -1,3 +1,8 @@
+2005-07-08 Veerapuram Varadhan <vvaradhan novell com>
+
+ * libedataserver/e-url.c:(e_uri_new): Fix handling of url's
+ without username/password/host/port fields.
+
2005-06-22 Tor Lillqvist <tml novell com>
* configure.in: Don't check locking on Win32. Add gnome-vfs-2.0 o
Index: libedataserver/e-url.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-url.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-url.c
--- libedataserver/e-url.c 24 Mar 2005 18:23:36 -0000 1.3
+++ libedataserver/e-url.c 7 Jul 2005 20:09:23 -0000
@@ -177,7 +177,23 @@ e_uri_new (const char *uri_string)
if (strncmp (uri_string, "//", 2) == 0) {
uri_string += 2;
- slash = uri_string + strcspn (uri_string, "/#");
+ /*
+ * Play safe. ;-)
+ * If username, password, host, port things are not
+ * specified in the url, find a way to not crib about
+ * them. So, check for the "existance" of magic "/" or
+ * "#" which will give a clue about the presence of something
+ * that we are looking for.
+ */
+
+ slash = strchr (uri_string, '/');
+ if (!slash)
+ slash = strchr (uri_string, '#');
+ if (slash)
+ slash = uri_string + strcspn (uri_string, "/#");
+ else
+ slash = uri_string;
+
at = strchr (uri_string, '@');
if (at && at < slash) {
colon = strchr (uri_string, ':');
@@ -219,8 +235,9 @@ e_uri_new (const char *uri_string)
uri_decode (uri->host);
uri->port = 0;
}
-
- uri_string = slash;
+ /* move the pointer appropriately ;-) */
+ if (slash > uri_string)
+ uri_string = slash;
}
/* find query */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]