From 776db524712ff2b80c9b44d5dae71dbc9b8d1d22 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Sat, 19 Jan 2008 09:25:20 -0800 Subject: [PATCH] case-insensitive content-type detection Apparently some mailers uppercase their shit. E.g.: Content-type: text/plain; Format=Flowed; Charset=iso-8859-1 --- lib/sup/util.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.45.2