diff options
-rw-r--r-- | camel/ChangeLog | 9 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 12 |
2 files changed, 17 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 68ef5df23b..1ddf48f6b4 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,12 @@ +2002-09-19 Jeffrey Stedfast <fejj@ximian.com> + + * providers/imap/camel-imap-folder.c (parse_fetch_response): Don't + increment the response pointer when deciding what type of header + response we got, this screws up the string that we strdup into the + part_spec string later. Also, instead of using the entire blob of + HEADER.FIELDS that we get in the response, shorten it to just + HEADER.FIELDS to use as the part_spec key. + 2002-09-18 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (CAMEL_MESSAGE_INFO_HEADERS): diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 4a0236f738..39450975d6 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -2527,11 +2527,10 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) if (*response == 'B') { response += 5; - /* HEADER], HEADER.FIELDS... or 0] */ + /* HEADER], HEADER.FIELDS (...)], or 0] */ if (!g_strncasecmp (response, "HEADER", 6)) { - response += 6; header = TRUE; - if (!g_strncasecmp (response, ".FIELDS ", 8)) + if (!g_strncasecmp (response + 6, ".FIELDS ", 8)) cache_header = FALSE; } else if (!g_strncasecmp (response, "0]", 2)) header = TRUE; @@ -2539,7 +2538,12 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response) p = strchr (response, ']'); if (!p || *(p + 1) != ' ') break; - part_spec = g_strndup (response, p - response); + + if (cache_header) + part_spec = g_strndup (response, p - response); + else + part_spec = g_strdup ("HEADER.FIELDS"); + response = p + 2; } else { part_spec = g_strdup (""); |