Bug 1418444 - Allow inline display and saving of Content-Type: application/octet-stream. r+a=jorgk
authorGene Smith <gds@chartertn.net>
Sun, 12 May 2019 21:24:21 +0200
changeset 32197 cd0440b2fedd3d5de4ee3f646f3c45eb4843a5b6
parent 32196 70ce813285f678f675a7ef2d83af7c4c82c47640
child 32198 0ba26e8ccd61fc0092d36f412cd1be0c0baf362f
push id190
push usermozilla@jorgk.com
push dateSun, 12 May 2019 19:49:38 +0000
treeherdercomm-esr60@29e8a0eb1dcb [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
@@ -714,20 +714,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
 }