From 7e6624257538df294f3dbd5f717ceba0d6ab43ab Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 1 Jun 2000 22:08:07 +0000 Subject: Fixes Bug 192. 2000-06-01 Not Zed * camel-mime-part.c (construct_from_parser): For a message part, set the default content-type to message/rfc822. Maybe needs to be done for multiparts too? 2000-05-31 Not Zed * camel-mime-message.c (construct_from_parser): Typo in assersion. * camel-mime-parser.c (folder_scan_step): Use a default type of message/rfc822 for multipart/digest. Bug Z192. (folder_scan_drop_step): Remove warning. svn path=/trunk/; revision=3340 --- camel/camel-mime-parser.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'camel/camel-mime-parser.c') diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c index 74c7653df3..acb29814d2 100644 --- a/camel/camel-mime-parser.c +++ b/camel/camel-mime-parser.c @@ -1466,10 +1466,16 @@ folder_scan_step(struct _header_scan_state *s, char **databuffer, int *datalengt tail_recurse: d({ printf("\nSCAN STACK:\n"); - printf(" '%s' :\n", states[s->state]); + printf(" '%s' :\n", states[s->state]); hb = s->parts; while (hb) { - printf(" '%s' : %s\n", states[hb->savestate], hb->boundary); + printf(" '%s' : %s ", states[hb->savestate], hb->boundary); + if (hb->content_type) { + printf("(%s/%s)", hb->content_type->type, hb->content_type->subtype); + } else { + printf("(default)"); + } + printf("\n"); hb = hb->parent; } printf("\n"); @@ -1543,6 +1549,16 @@ tail_recurse: type = HSCAN_MESSAGE; } } + } else { + /* make the default type for multipart/digest be message/rfc822 */ + if ((s->parts + && header_content_type_is(s->parts->content_type, "multipart", "digest"))) { + ct = header_content_type_decode("message/rfc822"); + type = HSCAN_MESSAGE; + d(printf("parent was multipart/digest, autoupgrading to message/rfc822?\n")); + /* maybe we should do this too? + header_raw_append_parse(&h->headers, "Content-Type: message/rfc822", -1);*/ + } } h->content_type = ct; folder_push_part(s, h); @@ -1667,6 +1683,8 @@ folder_scan_drop_step(struct _header_scan_state *s) s->state &= ~HSCAN_END; } return; + default: + /* FIXME: not sure if this is entirely right */ } } -- cgit v1.2.3