You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2004/01/09 00:45:16 UTC

svn commit: rev 6123 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin

Author: felicity
Date: Thu Jan  8 15:45:15 2004
New Revision: 6123

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


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm	Thu Jan  8 15:45:15 2004
@@ -677,11 +677,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: $_";
 	}
       }