about summary refs log tree commit homepage
path: root/lib/PublicInbox/WWW.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-22 00:06:45 +0000
committerEric Wong <e@80x24.org>2015-08-22 01:57:35 +0000
commit1704bdb4aabdbc155eb962edf51498f59b65c839 (patch)
tree6f88e2d1662a99062b0ebd74d94f7bd7c0db56e6 /lib/PublicInbox/WWW.pm
parent62395935e7bdd8e67776ebb9018f4633e67ff081 (diff)
downloadpublic-inbox-1704bdb4aabdbc155eb962edf51498f59b65c839.tar.gz
This should allow progressive rendering on the client and reduce
memory usage on the server.  Unfortunately XML::Atom::SimpleFeed
does not yet support streaming, so we may not use it in the
future.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r--lib/PublicInbox/WWW.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 68839d7c..2de54719 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -128,8 +128,7 @@ sub get_index {
         $ctx->{pi_config} = $pi_config;
         $ctx->{cgi} = $cgi;
         footer($ctx);
-        [ 200, [ 'Content-Type' => 'text/html; charset=UTF-8' ],
-          [ PublicInbox::Feed->generate_html_index($ctx) ] ]
+        PublicInbox::Feed::generate_html_index($ctx);
 }
 
 # just returns a string ref for the blob in the current ctx
@@ -195,10 +194,7 @@ sub get_thread {
         my $srch = searcher($ctx) or return need_search($ctx);
         require PublicInbox::View;
         my $foot = footer($ctx);
-        my $body = PublicInbox::View->thread_html($ctx, $foot, $srch) or
-                return r404();
-        [ 200, [ 'Content-Type' => 'text/html; charset=UTF-8' ],
-          [ $body ] ];
+        PublicInbox::View::thread_html($ctx, $foot, $srch);
 }
 
 sub self_url {