about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwStream.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r--lib/PublicInbox/WwwStream.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index d2bf318b..6de1b310 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -14,6 +14,12 @@ sub new {
         bless { nr => 0, cb => $cb, ctx => $ctx }, $class;
 }
 
+sub response {
+        my ($class, $ctx, $code, $cb) = @_;
+        [ $code, [ 'Content-Type', 'text/html; charset=UTF-8' ],
+          $class->new($ctx, $cb) ]
+}
+
 sub _html_top ($) {
         my ($self) = @_;
         my $ctx = $self->{ctx};