From f72164822464f630c56ac13edc6756987d1e48f6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 5 Jul 2020 23:27:25 +0000 Subject: {gzip,noop}filter: ->zmore returns undef, always This simplifies callers, as witnessed by the change to WwwListing. It adds overhead to NoopFilter, but NoopFilter should see little use as nearly all HTTP clients request gzip. --- lib/PublicInbox/WwwListing.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/WwwListing.pm') diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index 780c97e9..d641e6d5 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -109,7 +109,7 @@ sub html ($$) { my $h = [ 'Content-Type', 'text/html; charset=UTF-8', 'Content-Length', undef ]; my $gzf = gzf_maybe($h, $env) || PublicInbox::NoopFilter::new(); - my $out = $gzf->zmore('' . + $gzf->zmore('<html><head><title>' . 'public-inbox listing' . '
');
 	my $code = 404;
@@ -122,11 +122,11 @@ sub html ($$) {
 
 		my $tmp = join("\n", map { ibx_entry(@$_, $env) } @$list);
 		my $l = PublicInbox::Linkify->new;
-		$out .= $gzf->zmore($l->to_html($tmp));
+		$gzf->zmore($l->to_html($tmp));
 	} else {
-		$out .= $gzf->zmore('no inboxes, yet');
+		$gzf->zmore('no inboxes, yet');
 	}
-	$out .= $gzf->zflush('

'.
+	my $out = $gzf->zflush('

'.
 				PublicInbox::WwwStream::code_footer($env) .
 				'
'); $h->[3] = bytes::length($out); -- cgit v1.2.3-24-ge0c7