X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStream.pm;h=6de1b310da360bbbee5bcbd580b7d552bc2b8298;hp=d2bf318bed49a6027e68f7a696a91de1ff29de61;hb=e158d56a54d3c6d4890aa6ac4caa28a834279af0;hpb=eb2de0cded427c055e17237c3e23801082beef79 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};