about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-04-14 07:58:50 +0000
committerEric Wong <e@80x24.org>2014-04-14 08:04:16 +0000
commit6e517aa6dc310ec14c7f2e7cf5479d77f1be5069 (patch)
treebdd5e9b1b3c9179d9123e899294e55fddb508fb7
parent513defd67b678c8b8f2ab571e44d20a30b49c6f8 (diff)
downloadpublic-inbox-6e517aa6dc310ec14c7f2e7cf5479d77f1be5069.tar.gz
We do not have all messages in the top-level index
(and we need to adjust the test while we're at it).
-rw-r--r--lib/PublicInbox/Feed.pm4
-rw-r--r--t/cgi.t1
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 75e5d953..16b860cb 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -56,6 +56,10 @@ sub generate_html_index {
                 my $str = `git cat-file blob $_[0]`;
                 return 0 if $? != 0;
                 my $simple = Email::Simple->new($str);
+                if ($top && ($simple->header("In-Reply-To") ||
+                             $simple->header("References"))) {
+                        return 0;
+                }
                 $simple->body_set(""); # save some memory
                 push @messages, $simple;
                 1;
diff --git a/t/cgi.t b/t/cgi.t
index c8755541..91efca50 100644
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -134,7 +134,6 @@ EOF
 From: You <you\@example.com>
 To: Me <me\@example.com>
 Cc: $addr
-In-Reply-To: <blah\@example.com>
 Message-Id: <$slashy_mid>
 Subject: Re: hihi
 Date: Thu, 01 Jan 1970 00:00:01 +0000