Commit 284508a4 284508a42c850519a11a420cb915a4961042b89c by Sergey Poznyakoff

(url_parse0): Allow for <user>:<password>;AUTH=<auth> syntax.

1 parent fe794428
2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
* mailbox/url.c (url_parse0): Allow for
<user>:<password>;AUTH=<auth> syntax.
2008-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
Fix remote+ records.
......
......@@ -260,12 +260,17 @@ url_parse0 (mu_url_t u, char *name)
/* Try to split the user into a:
<user>:<password>
or
<user>;AUTH=<auth>
<user>:<password>;AUTH=<auth>
*/
for (; *name; name++)
{
if (*name == ';')
if (*name == ':')
{
*name++ = 0;
u->passwd = name;
}
else if (*name == ';')
{
/* Make sure it's the auth token. */
if (strncasecmp (name + 1, "auth=", 5) == 0)
......@@ -276,12 +281,6 @@ url_parse0 (mu_url_t u, char *name)
break;
}
}
if (*name == ':')
{
*name++ = 0;
u->passwd = name;
break;
}
}
}
......