sub async_eml { # for async_blob_cb
my ($ctx, $eml) = @_;
- $ctx->{http_out}->write($ctx->translate($ctx->{cb}->($ctx, $eml)));
+ $ctx->write($ctx->{cb}->($ctx, $eml));
}
sub html_top ($) {
'Content-Length' => undef ];
bless $ctx, __PACKAGE__;
$ctx->{gz} = PublicInbox::GzipFilter::gz_or_noop($res_hdr, $ctx->{env});
- $ctx->{base_url} //= do {
+ $ctx->{base_url} // do {
$ctx->zmore(html_top($ctx));
- base_url($ctx);
+ $ctx->{base_url} = base_url($ctx);
};
$ctx->zmore($$sref) if $sref;
my $bdy = $ctx->zflush(_html_end($ctx));
if (my $smsg = $ctx->{smsg} = $ctx->{cb}->($ctx)) {
$ctx->smsg_blob($smsg);
} else {
- $ctx->{http_out}->write(
- $ctx->translate(_html_end($ctx)));
+ $ctx->write(_html_end($ctx));
$ctx->close; # GzipFilter->close
}
};