summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2017-12-31 09:20:26 +0000
committerfukachan <fukachan>2017-12-31 09:20:26 +0000
commitb27f117efc1984db28fe58b065992525cb5f5dd8 (patch)
tree4e422789a96f142e80b2b3e64699102e7b394647
parent7662de8691e29232e8f1ee95adcd04ca26a42db9 (diff)
downloadfml8-b27f117efc1984db28fe58b065992525cb5f5dd8.tar.gz
fml8-b27f117efc1984db28fe58b065992525cb5f5dd8.tar.bz2
fml8-b27f117efc1984db28fe58b065992525cb5f5dd8.zip
apply patch to fix charset handling in Content-Type header
Thanks to <mizuki@myokoo.jp>.
-rw-r--r--CHANGES.txt12
-rw-r--r--fml/lib/Mail/Message.pm8
2 files changed, 17 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 63b10e13..64222f66 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -50,6 +50,16 @@
2004/09 以降の fml8 は疑似 MTA 的な動作をしていて、自分のメー
ルキューイングシステムを使ってエラー処理や再送処理を行ないます。
+2017/08/18
+
+ apply patch to fix charset handling in Content-Type header
+ Thanks to <mizuki@myokoo.jp>.
+
+2017/08/01
+
+ fml.org servers are being currenty re-designed to implement github mirror.
+
+
2017/03/04
fml-7.98.18-2015-08-15 snapshot is created as the further reference point.
@@ -10667,4 +10677,4 @@
このファイルを創設する:)
-$FML: CHANGES.txt,v 1.335 2013/04/14 05:13:12 fukachan Exp $
+$FML: CHANGES.txt,v 1.336 2017/03/04 02:39:21 fukachan Exp $
diff --git a/fml/lib/Mail/Message.pm b/fml/lib/Mail/Message.pm
index f020f452..32aeee8f 100644
--- a/fml/lib/Mail/Message.pm
+++ b/fml/lib/Mail/Message.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Message.pm,v 1.104 2006/01/09 14:00:55 fukachan Exp $
+# $FML: Message.pm,v 1.105 2006/04/15 06:33:01 fukachan Exp $
#
package Mail::Message;
@@ -2211,10 +2211,14 @@ sub charset
return $self->{ charset };
}
# content-type: text/plain; charset=ISO-2022-JP
+ # patch: <mizuki@myokoo.jp> 2017/02/09
+ # XXX /.*?/ vs /\S+/, strange MUA exists ? e.g. charset="ISO 2022 JP"
elsif (defined($buf) && $buf) {
my $_buf = $buf;
$_buf =~ s/\s*//gm;
- if ($_buf =~ /Content-Type:.*charset=\"(\S+)\"/i ||
+ if ($_buf =~ /Content-Type:.*charset=\"(.*?);\"/i ||
+ $_buf =~ /Content-Type:.*charset=(.*?);/i ||
+ $_buf =~ /Content-Type:.*charset=\"(\S+)\"/i ||
$_buf =~ /Content-Type:.*charset=(\S+)/i) {
my $charset = $1;
$charset =~ tr/A-Z/a-z/;