Undo my incorrect fix - I misunderstood danw - sorry!
2000-11-03 Jeffrey Stedfast <fejj@helixcode.com> * camel-url.c: Undo my incorrect fix - I misunderstood danw - sorry! svn path=/trunk/; revision=6386
This commit is contained in:
committed by
Jeffrey Stedfast
parent
0d78f798da
commit
e47b962e0d
@ -1,3 +1,8 @@
|
||||
2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
|
||||
|
||||
* camel-url.c: Undo my incorrect fix - I misunderstood danw -
|
||||
sorry!
|
||||
|
||||
2000-11-03 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
|
||||
|
||||
@ -116,19 +116,8 @@ camel_url_new (const char *url_string, CamelException *ex)
|
||||
if (at && (!slash || at < slash)) {
|
||||
colon = strchr (url_string, ':');
|
||||
if (colon && colon < at) {
|
||||
/* assume password is base64 encoded */
|
||||
int state = 0; int save = 0;
|
||||
char *passwd;
|
||||
int len;
|
||||
|
||||
passwd = g_strndup (colon + 1, at - colon - 1);
|
||||
camel_url_decode (passwd);
|
||||
|
||||
len = strlen (passwd);
|
||||
url->passwd = g_malloc (len);
|
||||
len = base64_decode_step (passwd, len, url->passwd, &state, &save);
|
||||
|
||||
url->passwd[len] = '\0';
|
||||
url->passwd = g_strndup (colon + 1, at - colon - 1);
|
||||
camel_url_decode (url->passwd);
|
||||
} else {
|
||||
url->passwd = NULL;
|
||||
colon = at;
|
||||
@ -199,19 +188,8 @@ camel_url_to_string (CamelURL *url, gboolean show_passwd)
|
||||
if (url->authmech)
|
||||
authmech = camel_url_encode (url->authmech, TRUE, ":@/");
|
||||
|
||||
if (show_passwd && url->passwd) {
|
||||
int state = 0, save = 0;
|
||||
int len;
|
||||
char *pass;
|
||||
|
||||
len = strlen (url->passwd);
|
||||
pass = g_malloc ((int)(len * 4 / 3) + 4);
|
||||
len = base64_encode_close (url->passwd, len, FALSE, pass, &state, &save);
|
||||
pass[len] = '\0';
|
||||
|
||||
passwd = camel_url_encode (pass, TRUE, "/");
|
||||
g_free (pass);
|
||||
}
|
||||
if (show_passwd && url->passwd)
|
||||
passwd = camel_url_encode (url->passwd, TRUE, "@/");
|
||||
|
||||
if (url->host)
|
||||
host = camel_url_encode (url->host, TRUE, ":/");
|
||||
|
||||
Reference in New Issue
Block a user