about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchView.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-30 09:13:21 +0000
committerEric Wong <e@80x24.org>2016-06-30 09:13:21 +0000
commite158d56a54d3c6d4890aa6ac4caa28a834279af0 (patch)
treec65de54c3d94ac1216de5161550063db0b6c2803 /lib/PublicInbox/SearchView.pm
parenteb2de0cded427c055e17237c3e23801082beef79 (diff)
downloadpublic-inbox-e158d56a54d3c6d4890aa6ac4caa28a834279af0.tar.gz
This encapsulates an entire PSGI response array, hopefully
making it easier to generate responses and avoid typos when
setting the Content-Type.
Diffstat (limited to 'lib/PublicInbox/SearchView.pm')
-rw-r--r--lib/PublicInbox/SearchView.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index 4af6cadb..30a310c9 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -55,9 +55,7 @@ sub sres_top_html {
                         $cb = mset_summary($ctx, $mset, $q);
                 }
         }
-
-        [ $code, ['Content-Type', 'text/html; charset=UTF-8'],
-                PublicInbox::WwwStream->new($ctx, $cb) ];
+        PublicInbox::WwwStream->response($ctx, $code, $cb);
 }
 
 # display non-threaded search results similar to what users expect from