2007-11-23 Milan Crha <mcrha@redhat.com>
** Fix for bug #461979
* camel-url.c: (camel_url_new_with_base):
The base URL can be without a path, so do not crash, if that happen.
svn path=/trunk/; revision=8236
+2007-11-23 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #461979
+
+ * camel-url.c: (camel_url_new_with_base):
+ The base URL can be without a path, so do not crash, if that happen.
+
2007-11-22 Milan Crha <mcrha@redhat.com>
** Fix for bug #376425
} else if (*url->path != '/') {
char *newpath, *last, *p, *q;
- last = strrchr (base->path, '/');
+ /* the base->path is NULL if given Content-Base url was without last slash,
+ i.e. like "http://example.com" (this expected only "http://example.com/") */
+ last = base->path ? strrchr (base->path, '/') : NULL;
if (last) {
newpath = g_strdup_printf ("%.*s/%s",
(int)(last - base->path),