Subject: Re: [sup-talk] [PATCH] don't downcase a nil content-type

From: William Morgan <[email-masked]>
Date: Mon, 12 Oct 2009 06:31:21 -0700

Applied directly to master. Thanks!
-- 
William <[email-masked]>
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Rich Lane <[email-masked]>
Date: Sat, 3 Oct 2009 11:19:57 -0700

---
 lib/sup/message.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 979597a..cbedb33 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -501,7 +501,7 @@ private
         # Lowercase the filename because searches are easier that way 
         @attachments.push filename.downcase unless filename =~ /^sup-attachment-/
         add_label :attachment unless filename =~ /^sup-attachment-/
-        content_type = m.header.content_type.downcase || "application/unknown" # sometimes RubyMail gives us nil
+        content_type = (m.header.content_type || "application/unknown").downcase # sometimes RubyMail gives us nil
         [Chunk::Attachment.new(content_type, filename, m, sibling_types)]
 
       ## otherwise, it's body text
-- 
1.6.4.2