commit bd5e8ad56266dd59b9cb7dbd39f1bea14259f4a7
parent d03007cfcd87e6c0ad855a82cc4b583f8dcf534b
Author: Elias Norberg <xyzzy@kudzu.se>
Date: Mon, 20 Apr 2015 00:05:37 +0200
Handle content-type-headers with spaces around parameter equal-sign
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -80,7 +80,7 @@ module RMail
end
def charset
- if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/i
+ if header.field?("content-type") && header.fetch("content-type") =~ /charset\s*=\s*"?(.*?)"?(;|$)/i
$1
end
end