my ($ctx) = @_;
my $msgs = $ctx->{msgs} = recent_msgs($ctx);
return _no_thread() unless @$msgs;
- PublicInbox::WwwAtomStream->response($ctx, 200, \&generate_i);
+ PublicInbox::WwwAtomStream->response($ctx, \&generate_i);
}
sub generate_thread_atom {
my ($ctx) = @_;
my $msgs = $ctx->{msgs} = $ctx->{ibx}->over->get_thread($ctx->{mid});
return _no_thread() unless @$msgs;
- PublicInbox::WwwAtomStream->response($ctx, 200, \&generate_i);
+ PublicInbox::WwwAtomStream->response($ctx, \&generate_i);
}
sub generate_html_index {
my ($cb, $mset, $q, $ctx) = @_;
$ctx->{ids} = $ctx->{ibx}->isrch->mset_to_artnums($mset);
$ctx->{search_query} = $q; # used by WwwAtomStream::atom_header
- PublicInbox::WwwAtomStream->response($ctx, 200, \&adump_i);
+ PublicInbox::WwwAtomStream->response($ctx, \&adump_i);
}
# callback for PublicInbox::WwwAtomStream::getline
-# Copyright (C) 2016-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
#
# Atom body stream for HTTP responses
}
sub response {
- my ($class, $ctx, $code, $cb) = @_;
+ my ($class, $ctx, $cb) = @_;
my $res_hdr = [ 'Content-Type' => 'application/atom+xml' ];
$class->new($ctx, $cb);
- $ctx->psgi_response($code, $res_hdr);
+ $ctx->psgi_response(200, $res_hdr);
}
# called once for each message by PSGI server