unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] view: do not fail on empty In-Reply-To
@ 2016-08-05  1:03 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-08-05  1:03 UTC (permalink / raw)
  To: meta

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-05  1:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05  1:03 [PATCH] view: do not fail on empty In-Reply-To Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).