From d4f5ce1bedd03191da5ecef2dc68381c10ef1fba Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 24 Jan 2005 12:16:16 +0000 Subject: more imap fixes --- (limited to 'kmicromail/libetpan') diff --git a/kmicromail/libetpan/imap/mailimap_parser.c b/kmicromail/libetpan/imap/mailimap_parser.c index 1c2ecde..560e58a 100644 --- a/kmicromail/libetpan/imap/mailimap_parser.c +++ b/kmicromail/libetpan/imap/mailimap_parser.c @@ -2399,8 +2399,26 @@ mailimap_body_fld_enc_parse(mailstream * fd, MMAPString * buffer, r = mailimap_string_parse(fd, buffer, &cur_token, &value, NULL, progr_rate, progr_fun); if (r != MAILIMAP_NO_ERROR) { - res = r; - goto err; + // LR start + // accept NIL and set type to utf8 + int ret = r; + r = mailimap_char_parse(fd, buffer, &cur_token, 'N'); + if (r == MAILIMAP_NO_ERROR) { + r = mailimap_char_parse(fd, buffer, &cur_token, 'I'); + if (r == MAILIMAP_NO_ERROR) { + r = mailimap_char_parse(fd, buffer, &cur_token, 'L'); + if (r == MAILIMAP_NO_ERROR) { + type = 4; + ret = MAILIMAP_NO_ERROR; + value = NULL; + } + } + } + if ( ret != MAILIMAP_NO_ERROR ) { + res = ret; + goto err; + } + // LR end } } else { -- cgit v0.9.0.2