From ea3f2cd7b766e9fcbca4ac8f5898c068b1a4251e Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Tue, 15 Apr 2008 12:09:54 +0000 Subject: [PATCH] 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 --- lib/Qpsmtpd/PollServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Qpsmtpd/PollServer.pm b/lib/Qpsmtpd/PollServer.pm index 2f75a7f..ff2bdbb 100644 --- a/lib/Qpsmtpd/PollServer.pm +++ b/lib/Qpsmtpd/PollServer.pm @@ -238,6 +238,7 @@ sub got_data { # 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})) { + $self->{prev_crlf} = $data =~ /\r\n\z/; $data =~ s/\r\n/\n/mg; $data =~ s/^\.\./\./mg; @@ -274,7 +275,6 @@ sub got_data { $self->transaction->body_write(\$data); $self->{data_size} += length $data; - $self->{prev_crlf} = $data =~ /\r\n\z/; }