X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=docs%2Fcontrib%2Freplyfilter;h=cbb8fff12ff2817bce10573466abdbff3d5124d6;hb=eabbcb91ae4e824930e9d9c9a206e40f0bdaf61f;hp=2e987946c745ce226d4938f54b44420673768758;hpb=acf0c6e13383bef83c288fd44dcf885b0ac69ebe;p=mmh diff --git a/docs/contrib/replyfilter b/docs/contrib/replyfilter index 2e98794..cbb8fff 100755 --- a/docs/contrib/replyfilter +++ b/docs/contrib/replyfilter @@ -193,7 +193,7 @@ sub process_text (*$$;$) binmode($input, ':encoding(us-ascii)'); - $decoder = find_decoder($encoding); + $decoder = find_decoder(lc($encoding)); if (! defined $decoder) { return 'EOF'; } @@ -348,7 +348,7 @@ sub process_html (*$$;$) my $filterpid, $prefixpid, $finread, $finwrite; my $foutread, $foutwrite, $decoder, $ret; - if (! defined($decoder = find_decoder($encoding))) { + if (! defined($decoder = find_decoder(lc($encoding)))) { return 'EOF'; } @@ -535,7 +535,7 @@ sub process_multipart ($$$) $charset = 'us-ascii'; } - $encoding = defined $cte ? $cte->param('_') : '7bit'; + $encoding = defined $cte ? lc($cte->param('_')) : '7bit'; $name = defined $cdispo ? $cdispo->param('filename') : undef; # @@ -661,15 +661,15 @@ sub null_decoder ($) sub match_boundary($$) { - my ($_, $boundary) = @_; + my ($line, $boundary) = @_; return if ! defined $boundary; - if (substr($_, 0, 2) eq '--') { - s/[ \t\r\n]+\Z//; - if ($_ eq "--$boundary") { + if (substr($line, 0, 2) eq '--') { + $line =~ s/[ \t\r\n]+\Z//; + if ($line eq "--$boundary") { return 'EOP'; - } elsif ($_ eq "--$boundary--") { + } elsif ($line eq "--$boundary--") { return 'EOM'; } }