From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.73.7 with SMTP id v7cs34834aga; Sat, 3 Oct 2009 11:25:26 -0700 (PDT) Received: by 10.224.110.146 with SMTP id n18mr2056191qap.278.1254594326281; Sat, 03 Oct 2009 11:25:26 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 16si4456039qyk.88.2009.10.03.11.25.26; Sat, 03 Oct 2009 11:25:26 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 99D801779934; Sat, 3 Oct 2009 14:25:25 -0400 (EDT) Received: from magnesium.club.cc.cmu.edu (MAGNESIUM.CLUB.CC.cmu.edu [128.237.157.15]) by rubyforge.org (Postfix) with ESMTP id 840A01858269 for ; Sat, 3 Oct 2009 14:20:54 -0400 (EDT) Received: (qmail 8815 invoked from network); 3 Oct 2009 18:20:52 -0000 Received: from pion.club.cc.cmu.edu (HELO localhost.localdomain) (128.237.157.88) by magnesium.club.cc.cmu.edu with SMTP; 3 Oct 2009 18:20:52 -0000 From: Rich Lane To: sup-talk@rubyforge.org Date: Sat, 3 Oct 2009 11:19:57 -0700 Message-Id: <1254593997-32634-1-git-send-email-rlane@club.cc.cmu.edu> X-Mailer: git-send-email 1.6.4.2 Subject: [sup-talk] [PATCH] don't downcase a nil content-type X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org --- 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 _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk