Mailing List Archive

svn commit: rev 6122 - incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin
Author: felicity
Date: Thu Jan 8 15:43:48 2004
New Revision: 6122

Modified:
incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/PerMsgStatus.pm
Log:
bug 2856: 'report_safe_copy_headers Received' would reverse the order of the Received headers


Modified: incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/PerMsgStatus.pm
==============================================================================
--- incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/PerMsgStatus.pm Thu Jan 8 15:43:48 2004
@@ -621,11 +621,16 @@
next if ( exists $already_added{lc $hdr} );
my @hdrtext = $self->{msg}->get_pristine_header($hdr);
$already_added{lc $hdr}++;
- foreach ( @hdrtext ) {
- if ( lc $hdr eq "received" ) { # add Received at the top ...
- $newmsg = "$hdr: $_$newmsg";
- }
- else { # if not Received, add at the bottom ...
+
+ if ( lc $hdr eq "received" ) { # add Received at the top ...
+ my $rhdr = "";
+ foreach (@hdrtext) {
+ $rhdr .= "$hdr: $_";
+ }
+ $newmsg = "$rhdr$newmsg";
+ }
+ else {
+ foreach ( @hdrtext ) {
$newmsg .= "$hdr: $_";
}
}