aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-07 05:28:23 +0800
committerDan Winship <danw@src.gnome.org>2000-07-07 05:28:23 +0800
commit5eae81928c7cb0507a4f0d5ff72bafce84baa394 (patch)
treed765d952baf12470b4060c8d043d45e070fb20be /camel
parent941a7e5a30f2a35eea69974a45fc516a4b3d5397 (diff)
downloadgsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.gz
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.bz2
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.lz
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.xz
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.tar.zst
gsoc2013-evolution-5eae81928c7cb0507a4f0d5ff72bafce84baa394.zip
Make this deal with the full RFC822 References/In-Reply-To format rather
* 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.) svn path=/trunk/; revision=3926
Diffstat (limited to 'camel')
-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;
}