You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2018/10/28 16:15:48 UTC

svn commit: r1845044 - /spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm

Author: hege
Date: Sun Oct 28 16:15:48 2018
New Revision: 1845044

URL: http://svn.apache.org/viewvc?rev=1845044&view=rev
Log:
Remove unnecessary trimming, use index

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm?rev=1845044&r1=1845043&r2=1845044&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm Sun Oct 28 16:15:48 2018
@@ -167,8 +167,8 @@ sub header {
   my $key    = lc($rawkey);
 
   # Trim whitespace off of the header keys
-  $key       =~ s/^\s+//;
-  $key       =~ s/\s+$//;
+  #$key       =~ s/^\s+//;
+  #$key       =~ s/\s+$//;
 
   if (@_) {
     my $raw_value = shift;
@@ -398,11 +398,11 @@ sub detect_utf16 {
 		$sum_h_o += hex $msg_h[$i+1];
 		$sum_l_e += hex $msg_l[$i];
 		$sum_l_o += hex $msg_l[$i+1];
-		if( $check_char =~ /20 00/ ) {
+		if (index($check_char, '20 00') >= 0) {
 			# UTF-16LE space char detected
 			$utf16le_clues++;
 		}
-		if( $check_char =~ /00 20/ ) {
+		if (index($check_char, '00 20') >= 0) {
 			# UTF-16BE space char detected
 			$utf16be_clues++;
 		}