aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-09-15 11:29:41 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-09-15 11:29:41 +0800
commit6e2ff991ae1bd70ac0659ea3acb80b0b139df165 (patch)
tree719aa7d315135c79c4ec33c43e486cccac5dd576 /camel/camel-mime-part.c
parente1aea06269544e81edbcc617dc00f672a7dc4deb (diff)
downloadgsoc2013-evolution-6e2ff991ae1bd70ac0659ea3acb80b0b139df165.tar.gz
gsoc2013-evolution-6e2ff991ae1bd70ac0659ea3acb80b0b139df165.tar.zst
gsoc2013-evolution-6e2ff991ae1bd70ac0659ea3acb80b0b139df165.zip
If header_msgid_decode fails for the content-id field, just grab whatever
2002-09-13 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (process_header): If header_msgid_decode fails for the content-id field, just grab whatever is between the <>'s (yes, this means that the content-id is invalid - but what can ya do?). Addresses bug #21027. svn path=/trunk/; revision=18071
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r--camel/camel-mime-part.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index c7545a6a9c..320324701b 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -43,6 +43,7 @@
#include "camel-mime-filter-charset.h"
#include "camel-mime-part.h"
#include "camel-mime-part-utils.h"
+#include "camel-mime-utils.h"
#include "camel-exception.h"
#include "camel-charset-map.h"
#include "string-utils.h"
@@ -235,7 +236,8 @@ process_header(CamelMedium *medium, const char *header_name, const char *header_
case HEADER_CONTENT_ID:
g_free (mime_part->content_id);
if (!(mime_part->content_id = header_msgid_decode (header_value))) {
- header_decode_lwsp (&header_value);
+ while (*header_value && strchr (" \t\r\n", *header_value))
+ header_value++;
if (*header_value == '<') {
p = header_value;
while (*p && *p != '>')
@@ -245,8 +247,8 @@ process_header(CamelMedium *medium, const char *header_name, const char *header_
mime_part->content_id = g_strdup (header_value);
}
- if (mime_part->header_value)
- g_strstrip (mime_part->header_value);
+ if (mime_part->content_id)
+ g_strstrip (mime_part->content_id);
}
break;
case HEADER_ENCODING: