From: William Morgan Date: Sat, 19 Jan 2008 17:25:20 +0000 (-0800) Subject: case-insensitive content-type detection X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=776db524712ff2b80c9b44d5dae71dbc9b8d1d22;p=sup case-insensitive content-type detection Apparently some mailers uppercase their shit. E.g.: Content-type: text/plain; Format=Flowed; Charset=iso-8859-1 --- diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 47bc1c2..ceaf0b8 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -62,7 +62,7 @@ module RMail end def charset - if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/ + if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/i $1 end end