From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS12876 163.172.208.0/20 X-Spam-Status: No, score=-1.5 required=3.0 tests=AWL,BAYES_00, RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_ZBI,RCVD_IN_XBL,SPF_FAIL,SPF_HELO_FAIL, TO_EQ_FM_DOM_SPF_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (torrelay1.tomhek.net [163.172.211.135]) by dcvr.yhbt.net (Postfix) with ESMTP id 7DA301F855 for ; Thu, 4 Aug 2016 21:58:43 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH] view: do not fail on empty In-Reply-To Date: Thu, 4 Aug 2016 21:58:40 +0000 Message-Id: <20160804215840.23211-1-e@80x24.org> List-Id: 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 e0d81f0..db0cdc0 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) { -- EW