From 5422a844b7384c32b3532d128e15e0b50d24435b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Jun 2016 02:35:14 +0000 Subject: www: use WwwStream for dumping thread and search views This allows us the HTTP server to react to backpressure from slow clients when writing. As a side effect, this also makes it easier for us to maintain a consistent header/footer across our HTML. --- lib/PublicInbox/WWW.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox/WWW.pm') diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 984268e9..196486f2 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -233,12 +233,10 @@ sub get_mid_html { # /$INBOX/$MESSAGE_ID/t/ sub get_thread { - my ($ctx, $flat) = @_; - my $srch = searcher($ctx) or return need_search($ctx); + my ($ctx) = @_; + searcher($ctx) or return need_search($ctx); require PublicInbox::View; - my $foot = footer($ctx); - $ctx->{flat} = $flat; - PublicInbox::View::thread_html($ctx, $foot, $srch); + PublicInbox::View::thread_html($ctx); } sub ctx_get { @@ -414,7 +412,6 @@ sub msg_page { 't.atom' eq $e and return get_thread_atom($ctx); 't.mbox' eq $e and return get_thread_mbox($ctx); 't.mbox.gz' eq $e and return get_thread_mbox($ctx, '.gz'); - 'T/' eq $e and return get_thread($ctx, 1); 'raw' eq $e and return get_mid_txt($ctx); # legacy, but no redirect for compatibility: -- cgit v1.2.3-24-ge0c7