Commit 284508a4 284508a42c850519a11a420cb915a4961042b89c by Sergey Poznyakoff

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

1 parent fe794428
1 2008-10-14 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * mailbox/url.c (url_parse0): Allow for
4 <user>:<password>;AUTH=<auth> syntax.
5
1 2008-10-05 Sergey Poznyakoff <gray@gnu.org.ua> 6 2008-10-05 Sergey Poznyakoff <gray@gnu.org.ua>
2 7
3 Fix remote+ records. 8 Fix remote+ records.
......
...@@ -260,12 +260,17 @@ url_parse0 (mu_url_t u, char *name) ...@@ -260,12 +260,17 @@ url_parse0 (mu_url_t u, char *name)
260 /* Try to split the user into a: 260 /* Try to split the user into a:
261 <user>:<password> 261 <user>:<password>
262 or 262 or
263 <user>;AUTH=<auth> 263 <user>:<password>;AUTH=<auth>
264 */ 264 */
265 265
266 for (; *name; name++) 266 for (; *name; name++)
267 { 267 {
268 if (*name == ';') 268 if (*name == ':')
269 {
270 *name++ = 0;
271 u->passwd = name;
272 }
273 else if (*name == ';')
269 { 274 {
270 /* Make sure it's the auth token. */ 275 /* Make sure it's the auth token. */
271 if (strncasecmp (name + 1, "auth=", 5) == 0) 276 if (strncasecmp (name + 1, "auth=", 5) == 0)
...@@ -276,12 +281,6 @@ url_parse0 (mu_url_t u, char *name) ...@@ -276,12 +281,6 @@ url_parse0 (mu_url_t u, char *name)
276 break; 281 break;
277 } 282 }
278 } 283 }
279 if (*name == ':')
280 {
281 *name++ = 0;
282 u->passwd = name;
283 break;
284 }
285 } 284 }
286 } 285 }
287 286
......