whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: override text/plain based on extension
Date Sun, 02 Apr 2017 19:28:06 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  3342ae1   override text/plain based on extension
3342ae1 is described below

commit 3342ae1e6823fd77388056f4d46df2726d2fc67c
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Apr 2 15:27:52 2017 -0400

    override text/plain based on extension
---
 www/secmail/models/attachment.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/secmail/models/attachment.rb b/www/secmail/models/attachment.rb
index ee2dcba..8d340c6 100644
--- a/www/secmail/models/attachment.rb
+++ b/www/secmail/models/attachment.rb
@@ -15,7 +15,7 @@ class Attachment
   def content_type
     type = headers[:mime] || @part.content_type
 
-    if type == 'application/octet-stream'
+    if type == 'application/octet-stream' or type == 'text/plain'
       type = 'text/plain' if name.end_with? '.sig'
       type = 'text/plain' if name.end_with? '.asc'
       type = 'application/pdf' if name.end_with? '.pdf'

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message