about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-04 21:58:40 +0000
committerEric Wong <e@80x24.org>2016-08-04 21:58:51 +0000
commit96529fbf563a82ed5dca7b0e79d87b2aa1f75b8f (patch)
tree3566567b1e1fe4e98bfacab4def8caabe02be33b
parent95acd5901491e4f333f5d2bbeed6fb5e6b53e07c (diff)
downloadpublic-inbox-96529fbf563a82ed5dca7b0e79d87b2aa1f75b8f.tar.gz
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.
-rw-r--r--lib/PublicInbox/View.pm2
1 files changed, 1 insertions, 1 deletions
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) {