Re: URLs with no host
- From: Philip Van Hoof <spam pvanhoof be>
- To: Alberto Garcia <agarcia igalia com>
- Cc: tinymail-devel-list gnome org
- Subject: Re: URLs with no host
- Date: Thu, 29 Nov 2007 21:18:29 +0100
Fix the assertion in the DBC. I don't think maildir is supposed to have
two slashes (like what your patch does).
If it does, please thoroughly test with the three slashes thingy:
It's basically about
maildir:/path/to/folder
vs
maildir:///path/to/folder
right?
On Tue, 2007-11-27 at 14:15 +0100, Alberto Garcia wrote:
> I think there's a problem in the way urls are built.
>
> In get_folder_info() from camel-maildir-store.c we're building a new
> maildir URL but we're not setting the host:
>
> /* ... */
> CamelURL *url;
>
> url = camel_url_new("maildir:", NULL);
> camel_url_set_path(url, ((CamelService *)local_store)->url->path);
>
> if (top == NULL || top[0] == 0 || strlen (top) == 0) {
> /* ... */
>
> If you look at camel_url_to_string() from camel-url.c, URLs with no
> host are like this: "protocol:path", so we have:
>
> maildir:/home/user/...
>
> There's an assertion in tny-msg.c that makes that crash:
>
> g_assert (strstr (retval, "://") != NULL);
>
> If I'm not wrong URLs with no host should have two slashes ('//')
> between the protocol and the path, as in file:///home/user... so I
> think the maildir URL should be:
>
> maildir:///home/user/...
>
> I'm attaching a patch against camel-url.c to always append '//' no
> matter the value of the hostname
>
> If that's not the proper format of the URL then the assertion is
> wrong.
>
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]