diff options
author | Eric Wong <e@yhbt.net> | 2020-07-05 23:27:40 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-07-06 20:01:15 +0000 |
commit | 20607bd628f4f8ea985661a8ce123ea482058144 (patch) | |
tree | 24019dbd27aae84320265d5c42f9eee18be2354f /lib/PublicInbox/WwwListing.pm | |
parent | 55263c56cf41c87f8977cd6a6be65ac07b5cea87 (diff) | |
download | public-inbox-20607bd628f4f8ea985661a8ce123ea482058144.tar.gz |
Virtually all of our responses are going to be gzipped, anyways. This will allow us to utilize zlib as a buffering layer and share common code for async blob retrieval responses. To streamline this and allow GzipFilter to be a parent class, we'll replace the NoopFilter with a similar CompressNoop class which emulates the two Compress::Raw::Zlib::Deflate methods we use. This drops a bunch of redundant code and will hopefully make upcoming WwwStream changes easier to reason about.
Diffstat (limited to 'lib/PublicInbox/WwwListing.pm')
-rw-r--r-- | lib/PublicInbox/WwwListing.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index d641e6d5..5f85e346 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -10,7 +10,6 @@ use PublicInbox::Hval qw(ascii_html prurl); use PublicInbox::Linkify; use PublicInbox::View; use PublicInbox::Inbox; -use PublicInbox::NoopFilter; use PublicInbox::GzipFilter qw(gzf_maybe); use bytes (); # bytes::length use HTTP::Date qw(time2str); @@ -108,7 +107,7 @@ sub html ($$) { my ($env, $list) = @_; my $h = [ 'Content-Type', 'text/html; charset=UTF-8', 'Content-Length', undef ]; - my $gzf = gzf_maybe($h, $env) || PublicInbox::NoopFilter::new(); + my $gzf = gzf_maybe($h, $env); $gzf->zmore('<html><head><title>' . 'public-inbox listing</title>' . '</head><body><pre>'); |