Skip to content

Commit

Permalink
When an article contained CRLF, parsing was broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Elie committed Feb 27, 2009
1 parent 06f9468 commit 2608498
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontends/mailpost.in
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ if (!$_) {
}
}

chomp $_;
# Remove (CR)LF at the end of each line.
s/\r?\n$//;

my $line = undef;
if (/^From\s+([^\s]+)\s+/) {
Expand All @@ -167,7 +168,8 @@ for (;;) {

$_ = <STDIN> ;
last unless defined $_ ;
chomp ;
# Remove (CR)LF at the end of each line.
s/\r?\n$//;

# Gather up a single header with possible continuation lines into $line.
if (/^\s+/) {
Expand Down Expand Up @@ -428,7 +430,8 @@ if ($opt_c) {
}
for (;;) {
$_ = <TMPFILE> ;
chomp ;
# Remove (CR)LF at the end of each line.
s/\r?\n$//;
last if defined($_) && /^$/ ;

if (/^Newsgroups:\s*/sio) {
Expand Down

0 comments on commit 2608498

Please sign in to comment.