From e158d56a54d3c6d4890aa6ac4caa28a834279af0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Jun 2016 09:13:21 +0000 Subject: www_stream: add response wrapper sub This encapsulates an entire PSGI response array, hopefully making it easier to generate responses and avoid typos when setting the Content-Type. --- lib/PublicInbox/WWW.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/WWW.pm') diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index cbd3142d..c4509bd9 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -236,8 +236,7 @@ sub get_mid_html { require Email::MIME; my $mime = Email::MIME->new($x); searcher($ctx); - [ 200, [ 'Content-Type' => 'text/html; charset=UTF-8' ], - PublicInbox::View::msg_html($ctx, $mime, $foot) ]; + PublicInbox::View::msg_html($ctx, $mime, $foot); } # /$INBOX/$MESSAGE_ID/t/ -- cgit v1.2.3-24-ge0c7