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