}
my $env = $ctx->{env};
if ($raw) {
- if ($code == 200) {
- my $gzf = gzf_maybe($hdr, $env);
- $txt = $gzf->translate($txt);
- $txt .= $gzf->zflush;
- }
+ $txt = gzf_maybe($hdr, $env)->zflush($txt) if $code == 200;
$hdr->[3] = length($txt);
return [ $code, $hdr, [ $txt ] ]
}
$txt = ascii_html($txt);
}
$txt = '<pre>' . $l->linkify_2($txt) . '</pre>';
+ $txt =~ s!\bPOP3\b!<a\nid=pop3>POP3</a>!;
+ $txt =~ s!\bNewsgroups\b!<a\nid=nntp>Newsgroups</a>!;
+ $txt =~ s!\bIMAP\b!<a\nid=imap>IMAP</a>!;
PublicInbox::WwwStream::html_oneshot($ctx, $code, \$txt);
}