]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwAltId.pm
tls: epollbit: account for miscellaneous OpenSSL errors
[public-inbox.git] / lib / PublicInbox / WwwAltId.pm
index 630ed6861cfc8d6ff21a167dfbd9a14ea95bca5b..2818400eabd17359446d3b72936a245b4f498bcb 100644 (file)
@@ -8,18 +8,9 @@ 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 ($) {
-       html_oneshot($_[0], 501, \<<EOF);
-<pre>sqlite3 not available
-
-The administrator needs to install the sqlite3(1) binary
-to support gzipped sqlite3 dumps.</pre>
-</pre>
-EOF
-}
-
 sub check_output {
        my ($r, $bref, $ctx) = @_;
        return html_oneshot($ctx, 500) if !defined($r);
@@ -64,23 +55,12 @@ or
 EOF
        }
 
-       eval { require PublicInbox::GzipFilter } or
-               return html_oneshot($ctx, 501, \<<EOF);
-<pre>gzip output not available
-
-The administrator needs to install the Compress::Raw::Zlib Perl module
-to support gzipped sqlite3 dumps.</pre>
-EOF
-       $sqlite3 //= which('sqlite3');
-       if (!defined($sqlite3)) {
-               return html_oneshot($ctx, 501, \<<EOF);
+       $sqlite3 //= which('sqlite3') // return html_oneshot($ctx, 501, \<<EOF);
 <pre>sqlite3 not available
 
 The administrator needs to install the sqlite3(1) binary
 to support gzipped sqlite3 dumps.</pre>
-</pre>
 EOF
-       }
 
        # setup stdin, POSIX requires writes <= 512 bytes to succeed so
        # we can close the pipe right away.