From: <ssc...@us...> - 2003-05-25 04:32:51
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv20430 Modified Files: Tag: v0/18/1 Bayes.pm Log Message: Perform insertion before questionable header content (lines without : or whitespace at start) [ 732181 ] Header inserted after <HTML> tag Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.107.2.5 retrieving revision 1.107.2.6 diff -C2 -d -r1.107.2.5 -r1.107.2.6 *** Bayes.pm 27 Apr 2003 21:05:00 -0000 1.107.2.5 --- Bayes.pm 25 May 2003 04:32:48 -0000 1.107.2.6 *************** *** 768,771 **** --- 768,772 ---- my $msg_head_before = ''; # Store the message headers that come before Subject here my $msg_head_after = ''; # Store the message headers that come after Subject here + my $msg_head_q = ''; # Store questionable message headers here my $msg_body = ''; # Store the message body here *************** *** 843,853 **** # Strip out the X-Text-Classification header that is in an incoming message ! if ( ( $line =~ /^X-Text-Classification:/i ) == 0 ) { if ( $msg_subject eq '' ) { ! $msg_head_before .= $line; } else { ! $msg_head_after .= $line; } ! } } } else { --- 844,861 ---- # Strip out the X-Text-Classification header that is in an incoming message ! next if ( $line =~ /^X-Text-Classification:/i ); ! ! if ( $line =~ /(^[ \t])|([:])/ ) { if ( $msg_subject eq '' ) { ! $msg_head_before .= $msg_head_q . $line; } else { ! $msg_head_after .= $msg_head_q . $line; } ! $msg_head_q = ''; ! } else { ! # Gather up any lines that are questionable ! ! $msg_head_q .= $line; ! } } } else { *************** *** 914,918 **** } ! $msg_head_after .= "$eol"; # Echo the text of the message to the client --- 922,926 ---- } ! $msg_head_after .= $msg_head_q . "$eol"; # Echo the text of the message to the client |