]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStream.pm
viewvcs: use shorter and simpler ctx->html_done
[public-inbox.git] / lib / PublicInbox / WwwStream.pm
index 1fc213d45f6b0457697ef1d7596e66b91e0d066b..c23668a440bbcfe12c4eee3d7ffb52533c21ae1a 100644 (file)
@@ -167,12 +167,12 @@ sub getline {
        $ctx->zflush(_html_end($ctx));
 }
 
-sub html_done ($$) {
-       my ($ctx, $code) = @_;
-       my $bdy = $ctx->zflush(_html_end($ctx));
+sub html_done ($;@) {
+       my $ctx = $_[0];
+       my $bdy = $ctx->zflush(@_[1..$#_], _html_end($ctx));
        my $res_hdr = delete $ctx->{-res_hdr};
        push @$res_hdr, 'Content-Length', length($bdy);
-       [ $code, $res_hdr, [ $bdy ] ]
+       [ 200, $res_hdr, [ $bdy ] ]
 }
 
 sub html_oneshot ($$;@) {