- if (my $gzf = gzf_maybe($h, $ctx->{env})) {
- $gzf->zmore(_html_top($ctx));
- $gzf->zmore($$sref) if $sref;
- $x[0] = $gzf->zflush(_html_end($ctx));
- $h->[3] = length($x[0]);
- } else {
- @x = (_html_top($ctx), $sref ? $$sref : (), _html_end($ctx));
- $h->[3] += bytes::length($_) for @x;
- }
- [ $code, $h, \@x ]
+ $ctx->{gz} = PublicInbox::GzipFilter::gz_or_noop($res_hdr, $ctx->{env});
+ $ctx->zmore(html_top($ctx));
+ $ctx->zmore($$sref) if $sref;
+ $bdy[0] = $ctx->zflush(_html_end($ctx));
+ $res_hdr->[3] = bytes::length($bdy[0]);
+ [ $code, $res_hdr, \@bdy ]