]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStream.pm
syscall: FS_IOC_*FLAGS: define on per-architecture basis
[public-inbox.git] / lib / PublicInbox / WwwStream.pm
index 5be5ed0cad59988572a2499f5262a3d1c8c50dc7..aee78170c713df91ea1186264080fb32a7e2dbfa 100644 (file)
@@ -32,7 +32,7 @@ sub init {
 
 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 ($) {
@@ -170,9 +170,9 @@ sub html_oneshot ($$;$) {
                '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));
@@ -187,8 +187,7 @@ sub async_next ($) {
                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
                }
        };