Bug 1418444 - Allow inline display and saving of Content-Type: application/octet-stream. r+a=jorgk
authorGene Smith <gds@chartertn.net>
Fri, 22 Mar 2019 02:04:10 -0400
changeset 33956 9f66c4248a572d695c43701b64e757f9d27e4db0
parent 33955 4fa819fdd79f2e0f046cec2a0cbdcb77e6c8c7d5
child 33957 39f40f151c57babdd70fdc3c7497d3bdcc720a78
push id2392
push usermozilla@jorgk.com
push dateSat, 23 Mar 2019 18:54:09 +0000
treeherdercomm-beta@8a987f6e6350 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1418444
Bug 1418444 - Allow inline display and saving of Content-Type: application/octet-stream. r+a=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
 }