aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-mime-utils.c30
2 files changed, 25 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b9dfd30f4c..8bd0400257 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2000-07-06 Dan Winship <danw@helixcode.com>
+
+ * camel-mime-utils.c (header_references_decode): Make this deal
+ with the full RFC822 References/In-Reply-To format rather than
+ just the more-nicely-behaved RFC1036 version. (Needed to parse
+ In-Reply-To headers with extra junk in them.)
+
2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index f2349b7e92..3163e637e4 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -1694,23 +1694,29 @@ header_references_decode(const char *in)
{
const char *inptr = in, *intmp;
struct _header_references *head = NULL, *node;
- char *id, *last;
+ char *id, *word;
if (in == NULL)
return NULL;
- header_decode_lwsp(&inptr);
- while (*inptr == '<') {
- last = inptr;
- id = header_msgid_decode_internal(&inptr);
- if (id) {
- node = g_malloc(sizeof(*node));
- node->next = head;
- head = node;
- node->id = id;
- }
+ while (*inptr) {
header_decode_lwsp(&inptr);
- } while (*inptr == '<' && last != inptr);
+ if (*inptr == '<') {
+ id = header_msgid_decode_internal(&inptr);
+ if (id) {
+ node = g_malloc(sizeof(*node));
+ node->next = head;
+ head = node;
+ node->id = id;
+ }
+ } else {
+ word = header_decode_word(&inptr);
+ if (word)
+ g_free (word);
+ else
+ break;
+ }
+ }
return head;
}