diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/imap.c | 7 |
3 files changed, 16 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-06-01 + + * libsylph/imap.c: support 8-bit literal (literal8) defined in RFC + 3516. + 2006-05-29 * version 2.2.5 diff --git a/ChangeLog.ja b/ChangeLog.ja index f7f5d836..06929841 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2006-06-01 + + * libsylph/imap.c: RFC 3516 で定義されている 8-bit リテラル (literal8) + に対応。 + 2006-05-29 * version 2.2.5 diff --git a/libsylph/imap.c b/libsylph/imap.c index 353b05f2..3bb84069 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -1918,7 +1918,7 @@ static GSList *imap_parse_list(IMAPSession *session, const gchar *real_path, buf[0] = '\0'; while (*p == ' ') p++; - if (*p == '{' || *p == '"') + if ((*p == '~' && *(p + 1) == '{') || *p == '{' || *p == '"') p = imap_parse_atom(session, p, buf, sizeof(buf), str); else strncpy2(buf, p, sizeof(buf)); @@ -2703,6 +2703,9 @@ static gchar *imap_parse_atom(IMAPSession *session, gchar *src, while (g_ascii_isspace(*cur_pos)) cur_pos++; } + if (*cur_pos == '~' && *(cur_pos + 1) == '{') + cur_pos++; + if (!strncmp(cur_pos, "NIL", 3)) { *dest = '\0'; cur_pos += 3; @@ -2761,6 +2764,8 @@ static gchar *imap_get_header(IMAPSession *session, gchar *cur_pos, g_return_val_if_fail(str != NULL, cur_pos); while (g_ascii_isspace(*cur_pos)) cur_pos++; + if (*cur_pos == '~' && *(cur_pos + 1) == '{') + cur_pos++; g_return_val_if_fail(*cur_pos == '{', cur_pos); |