commit 776db524712ff2b80c9b44d5dae71dbc9b8d1d22
parent f498025a70092a4f29322e7be8f578e525fae0fe
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Sat, 19 Jan 2008 09:25:20 -0800
case-insensitive content-type detection
Apparently some mailers uppercase their shit. E.g.:
Content-type: text/plain; Format=Flowed; Charset=iso-8859-1
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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