From 172fee0798fbacc4cd6d0338416e0ff4542df844 Mon Sep 17 00:00:00 2001 From: Matt Sergeant Date: Sun, 27 Mar 2005 17:54:35 +0000 Subject: [PATCH] Fix for corruption problem under Apache git-svn-id: https://svn.perl.org/qpsmtpd/trunk@400 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Apache/Qpsmtpd.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Apache/Qpsmtpd.pm b/lib/Apache/Qpsmtpd.pm index 60f210d..7efb1b1 100644 --- a/lib/Apache/Qpsmtpd.pm +++ b/lib/Apache/Qpsmtpd.pm @@ -112,11 +112,13 @@ sub getline { my $rc = $c->input_filters->get_brigade($bb, Apache::MODE_GETLINE); return if $rc == APR::EOF; die APR::Error::strerror($rc) unless $rc == APR::SUCCESS; - + my $data = ''; + while (!$bb->is_empty) { my $b = $bb->first; $b->remove; - $b->read(my $data); + $b->read(my $newdata); + $data .= $newdata; return $data if index($data, "\n") >= 0; } }