Bug 1418444 - Allow inline display and saving of Content-Type: application/octet-stream. r=jorgk
authorGene Smith <gds@chartertn.net>
Fri, 22 Mar 2019 02:04:10 -0400
changeset 26146 1aba8edbbfa2
parent 26145 83230ef727a3
child 26147 3e648008d386
push id15696
push usermozilla@jorgk.com
push dateSat, 23 Mar 2019 08:18:55 +0000
treeherdercomm-central@34cf7d8564ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1418444
Bug 1418444 - Allow inline display and saving of Content-Type: application/octet-stream. r=jorgk
mailnews/imap/src/nsIMAPBodyShell.cpp
--- a/mailnews/imap/src/nsIMAPBodyShell.cpp
+++ b/mailnews/imap/src/nsIMAPBodyShell.cpp
@@ -717,20 +717,21 @@ bool nsIMAPBodypartLeaf::ShouldFetchInli
       // which was derived from its OTHER child.  (The data fork.)
       return m_parentPart->ShouldFetchInline(aShell);
     }
     // it is applesingle
     return false;  // we can leave it on the server
   }
 #endif // XP_MACOSX
 
-  // Leave out parts with type application/*
-  if (!PL_strcasecmp(m_bodyType, "APPLICATION") &&  // If it is of type "application"
-      PL_strncasecmp(m_bodySubType, "x-pkcs7", 7)  // and it's not a signature (signatures are inline)
-    )
+  // Fetch type APPLICAION now if the subtype is a signature or if it's an
+  // octet-stream. Otherwise, fetch on demand.
+  if (!PL_strcasecmp(m_bodyType, "APPLICATION") &&
+      PL_strncasecmp(m_bodySubType, "x-pkcs7", 7) &&
+      PL_strcasecmp(m_bodySubType, "octet-stream"))
     return false;  // we can leave it on the server
   if (!PL_strcasecmp(m_bodyType, "AUDIO"))
     return false;
   // Here's where we can add some more intelligence -- let's leave out
   // any other parts that we know we can't display inline.
   return true;  // we're downloading it inline
 }