projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement the following changes:
[mmh]
/
docs
/
contrib
/
replyfilter
diff --git
a/docs/contrib/replyfilter
b/docs/contrib/replyfilter
index
a080710
..
ed4fe6b
100755
(executable)
--- a/
docs/contrib/replyfilter
+++ b/
docs/contrib/replyfilter
@@
-193,7
+193,7
@@
sub process_text (*$$;$)
binmode($input, ':encoding(us-ascii)');
binmode($input, ':encoding(us-ascii)');
- $decoder = find_decoder($encoding);
+ $decoder = find_decoder(lc($encoding));
if (! defined $decoder) {
return 'EOF';
}
if (! defined $decoder) {
return 'EOF';
}
@@
-321,7
+321,7
@@
sub process_text (*$$;$)
# Send our input to the filter program
#
# Send our input to the filter program
#
- if (defined %filterreplace) {
+ if (%filterreplace) {
foreach my $match (keys %filterreplace) {
$text =~ s/$match/$filterreplace{$match}/g;
}
foreach my $match (keys %filterreplace) {
$text =~ s/$match/$filterreplace{$match}/g;
}
@@
-348,7
+348,7
@@
sub process_html (*$$;$)
my $filterpid, $prefixpid, $finread, $finwrite;
my $foutread, $foutwrite, $decoder, $ret;
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';
}
return 'EOF';
}
@@
-661,15
+661,15
@@
sub null_decoder ($)
sub match_boundary($$)
{
sub match_boundary($$)
{
- my ($_, $boundary) = @_;
+ my ($line, $boundary) = @_;
return if ! defined $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';
return 'EOP';
- } elsif ($_ eq "--$boundary--") {
+ } elsif ($line eq "--$boundary--") {
return 'EOM';
}
}
return 'EOM';
}
}