Make sure we check for \r\n before we fixup the CRs

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@876 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2008-04-15 12:09:54 +00:00
parent e93284caaa
commit ea3f2cd7b7

View File

@ -238,6 +238,7 @@ sub got_data {
# add a transaction->blocked check back here when we have line by line plugin access... # add a transaction->blocked check back here when we have line by line plugin access...
unless (($self->{max_size} and $self->{data_size} > $self->{max_size})) { unless (($self->{max_size} and $self->{data_size} > $self->{max_size})) {
$self->{prev_crlf} = $data =~ /\r\n\z/;
$data =~ s/\r\n/\n/mg; $data =~ s/\r\n/\n/mg;
$data =~ s/^\.\./\./mg; $data =~ s/^\.\./\./mg;
@ -274,7 +275,6 @@ sub got_data {
$self->transaction->body_write(\$data); $self->transaction->body_write(\$data);
$self->{data_size} += length $data; $self->{data_size} += length $data;
$self->{prev_crlf} = $data =~ /\r\n\z/;
} }