From ead71b8c387f0748338a4add37eeb437a14b02d8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 25 Oct 2021 02:45:52 +0000 Subject: gzip_filter: delay async wcb call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will let us modify the response header later to set a proper charset for Content-Type when displaying raw messages. Cc: Thomas Weißschuh --- lib/PublicInbox/WwwStream.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/WwwStream.pm') diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 5be5ed0c..6d7c447f 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -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 ($) { @@ -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 } }; -- cgit v1.2.3-24-ge0c7