From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 43B331F45A; Tue, 21 Apr 2020 07:22:45 +0000 (UTC) Date: Tue, 21 Apr 2020 07:22:45 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [squash] wwwaltid: use gzipfilter up front Message-ID: <20200421072245.GA29698@dcvr> References: <20200421065734.14216-1-e@yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200421065734.14216-1-e@yhbt.net> List-Id: Eric Wong wrote: > This allows us to simplify some of our existing code and make > future changes easier. Can't go to the golf course, so Perl golf it is! diff --git a/lib/PublicInbox/WwwAltId.pm b/lib/PublicInbox/WwwAltId.pm index 630ed686..e5476d1f 100644 --- a/lib/PublicInbox/WwwAltId.pm +++ b/lib/PublicInbox/WwwAltId.pm @@ -8,6 +8,7 @@ use PublicInbox::Qspawn; use PublicInbox::WwwStream qw(html_oneshot); use PublicInbox::AltId; use PublicInbox::Spawn qw(which); +use PublicInbox::GzipFilter; our $sqlite3 = $ENV{SQLITE3}; sub sqlite3_missing ($) { @@ -64,13 +65,6 @@ or EOF } - eval { require PublicInbox::GzipFilter } or - return html_oneshot($ctx, 501, \<gzip output not available - -The administrator needs to install the Compress::Raw::Zlib Perl module -to support gzipped sqlite3 dumps. -EOF $sqlite3 //= which('sqlite3'); if (!defined($sqlite3)) { return html_oneshot($ctx, 501, \<