From 96529fbf563a82ed5dca7b0e79d87b2aa1f75b8f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 4 Aug 2016 21:58:40 +0000 Subject: view: do not fail on empty In-Reply-To Sometimes messages have an empty In-Reply-To header which throws threaders off. This actually causes public-inbox-httpd to die, which is probably bad and will be fixed elsewhere. --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index e0d81f00..db0cdc0e 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -94,7 +94,7 @@ sub in_reply_to { my ($hdr) = @_; my $irt = $hdr->header_raw('In-Reply-To'); - return mid_clean($irt) if (defined $irt); + return mid_clean($irt) if defined $irt && $irt ne ''; my $refs = $hdr->header_raw('References'); if ($refs && $refs =~ /<([^>]+)>\s*\z/s) { -- cgit v1.2.3-24-ge0c7