aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-05-31 15:52:53 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-05-31 15:52:53 +0000
commitbf13dc6d511ec175e128a2257a7d0403f1c0414a (patch)
treeabde9b15f3aa1d209b078c5a9f984bf925246193
parent5bc166a8cc800eb582a5097582beb2df33c9ed71 (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
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--libsylph/imap.c7
3 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 94d525d8..4a5f8a13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);