about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-20 08:54:32 +0000
committerEric Wong <e@80x24.org>2015-08-20 08:56:12 +0000
commit9c93edcdefb01f193aced818142b050aeffc04e1 (patch)
tree0f16b4bca01c93344093a3532aa68c6bf89d54eb /lib/PublicInbox/Search.pm
parent8c8b659c68e9191b412da7d8db03919fbace5179 (diff)
downloadpublic-inbox-9c93edcdefb01f193aced818142b050aeffc04e1.tar.gz
This is for consistency with ssoma.  I doubt it makes
a difference in practice, but in case somebody decides
any of the Message-ID-containing headers should have
strange characters, we'll decode and attempt to thread
them.  This isn't an attack vector, just a way to
make messages thread improperly which is pointless...
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index d9e5fd1f..2c66e557 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -84,7 +84,7 @@ sub add_message {
         my $db = $self->{xdb};
 
         my $doc_id;
-        my $mid_orig = mid_clean($mime->header_obj->header_raw('Message-ID'));
+        my $mid_orig = mid_clean($mime->header_obj->header('Message-ID'));
         my $mid = mid_compressed($mid_orig);
         my $was_ghost = 0;
         my $ct_msg = $mime->header('Content-Type') || 'text/plain';
@@ -348,9 +348,9 @@ sub link_message_to_parents {
         my $doc = $smsg->{doc};
         my $mid = mid_compressed($smsg->mid);
         my $mime = $smsg->mime;
-        my $refs = $mime->header_obj->header_raw('References');
+        my $refs = $mime->header_obj->header('References');
         my @refs = $refs ? ($refs =~ /<([^>]+)>/g) : ();
-        my $irt = $mime->header_obj->header_raw('In-Reply-To');
+        my $irt = $mime->header_obj->header('In-Reply-To');
         if ($irt) {
                 if ($irt =~ /<([^>]+)>/) {
                         $irt = $1;
@@ -529,7 +529,7 @@ sub index_blob {
 sub unindex_blob {
         my ($self, $git, $blob) = @_;
         my $mime = do_cat_mail($git, $blob) or return;
-        my $mid = $mime->header_obj->header_raw('Message-ID');
+        my $mid = $mime->header_obj->header('Message-ID');
         eval { $self->remove_message($mid) } if defined $mid;
         warn "W: unindex_blob $blob: $@\n" if $@;
 }