|
From: <jgr...@us...> - 2003-08-01 00:36:30
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv22465/Proxy
Modified Files:
POP3.pm
Log Message:
Fix two bugs in our TOP handling when toptoo is enabled: 1. we were getting the +OK twice which meant that TOPed messages out have a +OK 'header' 2. We were not sending the message number into the second classify call and hence the XPL link had the wrong thing in it: both discovered because of the test suite
Index: POP3.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** POP3.pm 31 Jul 2003 23:39:06 -0000 1.69
--- POP3.pm 1 Aug 2003 00:36:26 -0000 1.70
***************
*** 308,316 ****
if ( $command =~ /TOP (.*) (.*)/i ) {
if ( $2 ne '99999999' ) {
if ( $self->config_( 'toptoo' ) ) {
! my $count = $1;
!
! if ( $self->echo_response_($mail, $client, "RETR $1" ) ) {
# Classify without echoing to client, saving file for later RETR's
--- 308,316 ----
if ( $command =~ /TOP (.*) (.*)/i ) {
+ my $count = $1;
+
if ( $2 ne '99999999' ) {
if ( $self->config_( 'toptoo' ) ) {
! if ( $self->echo_response_($mail, $client, "RETR $count" ) ) {
# Classify without echoing to client, saving file for later RETR's
***************
*** 320,328 ****
$downloaded{$count} = 1;
! if ( $self->echo_response_($mail, $client, $command ) ) {
# Classify with pre-defined class, without saving, echoing to client
! $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, 0, 1, $class, 1 );
# Tell the parent that we just handled a mail
--- 320,331 ----
$downloaded{$count} = 1;
! # Note that the 1 here indicates that echo_response_ does not send the response to the
! # client. The +OK has already been sent by the RETR
!
! if ( $self->echo_response_($mail, $client, $command, 1 ) ) {
# Classify with pre-defined class, without saving, echoing to client
! $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 1, $class, 1 );
# Tell the parent that we just handled a mail
|