We only return 200s for any response large enough to warrant
->html_done, so we can just assume it. ViewVCS can also take
advantage of it with some tweaking to avoid an extra method
dispatch.
${$ctx->{obuf}} .= '</pre><hr>';
}
html_footer($ctx, $eml);
- $ctx->html_done(200);
+ $ctx->html_done;
}
# public functions: (unstable)
Every commit references one top-level <dfn id=tree>tree</dfn> object.</pre>
EOM
- $x = $ctx->zflush($x, $ctx->_html_end);
- my $res_hdr = delete $ctx->{-res_hdr};
- push @$res_hdr, 'Content-Length', length($x);
- delete($ctx->{env}->{'qspawn.wcb'})->([200, $res_hdr, [$x]]);
+ delete($ctx->{env}->{'qspawn.wcb'})->($ctx->html_done($x));
}
sub stream_patch_parse_hdr { # {parse_hdr} for Qspawn
$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 ($$;@) {