X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStream.pm;h=ec9ae0cf25b167fc296bb37ada4184923ad3fa13;hb=10e38b3b0fdad7e2881f0571f9b2717df2151f7a;hp=d2bf318bed49a6027e68f7a696a91de1ff29de61;hpb=2c69f7bc34a2b12dc7f55e2bb24fa28565f24f03;p=public-inbox.git diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index d2bf318b..ec9ae0cf 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -7,11 +7,21 @@ use strict; use warnings; use PublicInbox::Hval qw(ascii_html); use URI; -use constant PI_URL => 'https://public-inbox.org/README.html'; +our $TOR_URL = 'https://www.torproject.org/'; +our $CODE_URL = 'https://public-inbox.org/'; +our $PROJECT = 'public-inbox'; + +sub close {} sub new { my ($class, $ctx, $cb) = @_; - bless { nr => 0, cb => $cb, ctx => $ctx }, $class; + bless { nr => 0, cb => $cb || *close, 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 ($) { @@ -33,7 +43,8 @@ sub _html_top ($) { } # XXX gross, for SearchView.pm my $extra = $ctx->{-extra_form_html} || ''; - $top = qq{