]> granicus.if.org Git - mutt/commitdiff
Make multipart decoding a little more forgiving.
authorBrendan Cully <brendan@kublai.com>
Wed, 25 Jun 2008 06:12:02 +0000 (23:12 -0700)
committerBrendan Cully <brendan@kublai.com>
Wed, 25 Jun 2008 06:12:02 +0000 (23:12 -0700)
First, ignore bad content-transfer-encoding in multipart sections.
Second, if an attachment fails to decode, print a warning and continue
instead of giving up on the entire message.

ChangeLog
handler.c

index 14f1ca7951cf41d95951c45799422267020c3b0e..fd648f240ad36b16cea26edb75ff1ef17e7f4718 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+1970-01-01 00:00 +0000  Brendan Cully  <brendan@kublai.com>  (a2e8f6fab8d3)
+
+       * smtp.c: Test that envelope from or from is set before attempting
+       SMTP delivery. Closes #3079.
+
+2008-06-14 18:23 -0700  Christoph Berg  <cb@df7cb.de>  (4b790909a037)
+
+       * doc/mbox.man: Document that From_ lines use asctime-style dates,
+       not RFC2822 dates. Closes #3077.
+
 2008-06-11 22:45 -0700  Alexey I. Froloff  <raorn@altlinux.org>  (1e8ca708a52f)
 
        * attach.c: Do not attempt to close invalid descriptors. Closes #3075
index d2ad711268ed2d4c25d0b22463bf2aa738e01571..279f38a8c1bba07297a7418e055880f7d1a62040 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1199,11 +1199,12 @@ int multipart_handler (BODY *a, STATE *s)
     
     if (rc)
     {
+      mutt_error ("One or more parts of this message could not be displayed");
       dprint (1, (debugfile, "Failed on attachment #%d, type %s/%s.\n", count, TYPE(p), NONULL (p->subtype)));
     }
     
-    if (rc || ((s->flags & M_REPLYING)
-               && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE)))
+    if ((s->flags & M_REPLYING)
+        && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE))
       break;
   }
 
@@ -1564,6 +1565,14 @@ int mutt_body_handler (BODY *b, STATE *s)
 
     if (!handler)
       handler = multipart_handler;
+    
+    if (b->encoding != ENC7BIT && b->encoding != ENC8BIT
+        && b->encoding != ENCBINARY)
+    {
+      dprint (1, (debugfile, "Bad encoding type %d for multipart entity, "
+                  "assuming 7 bit\n", b->encoding));
+      b->encoding = ENC7BIT;
+    }
   }
   else if (WithCrypto && b->type == TYPEAPPLICATION)
   {