body_write patches from Brian Grossman
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@395 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
58f03e5787
commit
41e13e7454
@ -302,6 +302,7 @@ sub end_of_data {
|
||||
$header = Mail::Header->new(Modify => 0, MailFrom => "COERCE");
|
||||
$self->transaction->header($header);
|
||||
}
|
||||
|
||||
# only true if client authenticated
|
||||
if ( defined $self->{_auth} and $self->{_auth} == OK ) {
|
||||
$header->add("X-Qpsmtpd-Auth","True");
|
||||
|
@ -454,7 +454,7 @@ sub data {
|
||||
# save us buffering the mail content.
|
||||
|
||||
# Save the start of just the body itself
|
||||
$self->transaction->body_start($size);
|
||||
$self->transaction->set_body_start();
|
||||
|
||||
}
|
||||
|
||||
|
@ -107,10 +107,12 @@ sub body_write {
|
||||
while ($$ref =~ m/\G(.*?\n)/gc) {
|
||||
push @{ $self->{_body_array} }, $1;
|
||||
$self->{_body_size} += length($1);
|
||||
++$self->{_body_current_pos};
|
||||
}
|
||||
if ($$ref =~ m/\G(.+)\z/gc) {
|
||||
push @{ $self->{_body_array} }, $1;
|
||||
$self->{_body_size} += length($1);
|
||||
++$self->{_body_current_pos};
|
||||
}
|
||||
if ($self->{_body_size} >= $self->{_size_threshold}) {
|
||||
#warn("spooling to disk\n");
|
||||
|
Loading…
Reference in New Issue
Block a user