diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-05-31 15:52:53 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-05-31 15:52:53 +0000 |
commit | bf13dc6d511ec175e128a2257a7d0403f1c0414a (patch) | |
tree | abde9b15f3aa1d209b078c5a9f984bf925246193 /libsylph/imap.c | |
parent | 5bc166a8cc800eb582a5097582beb2df33c9ed71 (diff) |
imap.c: support 8-bit literal (literal8) defined in RFC 3516.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1077 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/imap.c')
-rw-r--r-- | libsylph/imap.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |