aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-09-19 14:17:16 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-09-19 14:17:16 +0800
commit41693f9a19aca811bf6edab18b967855ec2b129a (patch)
tree416aa0927f40446d599fca863b67446db26847e0 /camel
parentbc3278d87a6da2036f3ae4bcf2dc1a149199a9c4 (diff)
downloadgsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.tar
gsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.tar.gz
gsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.tar.bz2
gsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.tar.lz
gsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.tar.xz
gsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.tar.zst
gsoc2013-evolution-41693f9a19aca811bf6edab18b967855ec2b129a.zip
Don't increment the response pointer when deciding what type of header
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. svn path=/trunk/; revision=18111
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/imap/camel-imap-folder.c12
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 ("");