From 43238d3688a51d98ce47151173aa7971e231a3bb Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Sep 2015 03:00:28 +0000 Subject: get rid of Message-ID compression entirely Provide a fallback for legacy SHA-1 messages, but do not advertise shorter URLs anymore for data portability concerns. This fixes a regression introduced in commit 81a9c1b476987d845b340ab9013d26cf4487cb9a ("search: disable Message-ID compression in Xapian") which ended up breaking thread-related endpoints for large Message-IDs, as lookups on the SHA-1 message no longer worked. --- lib/PublicInbox/Feed.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 8fc65fb5..2284f239 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -9,7 +9,7 @@ use Date::Parse qw(strptime); use PublicInbox::Hval; use PublicInbox::GitCatFile; use PublicInbox::View; -use PublicInbox::MID qw/mid_clean mid_compress mid2path/; +use PublicInbox::MID qw/mid_clean mid2path/; use POSIX qw/strftime/; use constant { DATEFMT => '%Y-%m-%dT%H:%M:%SZ', # atom standard @@ -393,8 +393,7 @@ sub add_topic { my $mime = do_cat_mail($git, $path) or return 0; $header_obj = $mime->header_obj; } - my $mid = $header_obj->header('Message-ID'); - $mid = mid_compress(mid_clean($mid)); + my $mid = mid_clean($header_obj->header('Message-ID')); $u = $enc_utf8->decode($u); push @$order, [ $mid, $ts, $u, $subj, $topic ]; return 1; -- cgit v1.2.3-24-ge0c7