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-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 4331D1F916 for ; Sun, 5 Jul 2020 23:28:08 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 13/43] stop auto-loading Plack::Middleware::Deflater Date: Sun, 5 Jul 2020 23:27:29 +0000 Message-Id: <20200705232759.3161-14-e@yhbt.net> In-Reply-To: <20200705232759.3161-1-e@yhbt.net> References: <20200705232759.3161-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Instead of gzipping some (mbox.gz, manifest.js.gz) responses and leaving P::M::D to do the rest, we gzip everything ourselves, now, so P::M::D is redundant. --- Documentation/public-inbox-httpd.pod | 1 - INSTALL | 5 ----- ci/deps.perl | 1 - examples/cgit.psgi | 8 -------- examples/newswww.psgi | 8 -------- examples/public-inbox.psgi | 9 --------- examples/unsubscribe.psgi | 1 - script/public-inbox-httpd | 9 --------- script/public-inbox.cgi | 7 ------- 9 files changed, 49 deletions(-) diff --git a/Documentation/public-inbox-httpd.pod b/Documentation/public-inbox-httpd.pod index c1ebfd822..2f4e9e5d1 100644 --- a/Documentation/public-inbox-httpd.pod +++ b/Documentation/public-inbox-httpd.pod @@ -15,7 +15,6 @@ the PSGI file. If a PSGI file is not specified, L is loaded with a default middleware stack consisting of -L, L, and L diff --git a/INSTALL b/INSTALL index 05e0f95e9..9f05c3f62 100644 --- a/INSTALL +++ b/INSTALL @@ -100,11 +100,6 @@ Numerous optional modules are likely to be useful as well: (ensures redirects are correct when running behind nginx or Varnish) -- Plack::Middleware::Deflater deb: libplack-middleware-deflater-perl - pkg: p5 -Plack-Middleware-Deflater - rpm: perl-Plack-Middleware-Deflater - (saves bandwidth on responses) - * highlight deb: libhighlight-perl (for syntax highlighting with coderepo) diff --git a/ci/deps.perl b/ci/deps.perl index 501f51129..77d95fc8e 100755 --- a/ci/deps.perl +++ b/ci/deps.perl @@ -36,7 +36,6 @@ my $profiles = { Net::Server Plack Plack::Test - Plack::Middleware::Deflater Plack::Middleware::ReverseProxy Search::Xapian Socket6 diff --git a/examples/cgit.psgi b/examples/cgit.psgi index e72e832d0..7ad38e280 100644 --- a/examples/cgit.psgi +++ b/examples/cgit.psgi @@ -18,14 +18,6 @@ my $pi_config = PublicInbox::Config->new; my $cgit = PublicInbox::Cgit->new($pi_config); builder { - eval { - enable 'Deflater', - content_type => [ qw( - text/html - text/plain - application/atom+xml - )] - }; eval { enable 'ReverseProxy' }; enable 'Head'; sub { $cgit->call($_[0]) } diff --git a/examples/newswww.psgi b/examples/newswww.psgi index 3cce7191d..52ad7043e 100644 --- a/examples/newswww.psgi +++ b/examples/newswww.psgi @@ -36,14 +36,6 @@ builder { # regular PublicInbox::WWW code: # see comments in examples/public-inbox.psgi for more info: mount '/' => builder { - eval { - enable 'Deflater', - content_type => [ qw( - text/html - text/plain - application/atom+xml - )] - }; eval { enable 'ReverseProxy' }; enable 'Head'; sub { $www->call($_[0]) } diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi index 9891a1f03..3537be2c7 100644 --- a/examples/public-inbox.psgi +++ b/examples/public-inbox.psgi @@ -22,15 +22,6 @@ my $src = $ENV{SRC_GIT_DIR}; # '/path/to/public-inbox.git' $src = PublicInbox::Git->new($src) if defined $src; builder { - eval { - enable 'Deflater', - content_type => [ qw( - text/html - text/plain - application/atom+xml - )] - }; - # Enable to ensure redirects and Atom feed URLs are generated # properly when running behind a reverse proxy server which # sets the X-Forwarded-Proto request header. diff --git a/examples/unsubscribe.psgi b/examples/unsubscribe.psgi index 6a40f251d..7b97e2532 100644 --- a/examples/unsubscribe.psgi +++ b/examples/unsubscribe.psgi @@ -61,7 +61,6 @@ my $app = PublicInbox::Unsubscribe->new( builder { mount '/u' => builder { - eval { enable 'Deflater' }; # optional eval { enable 'ReverseProxy' }; # optional enable 'Head'; sub { $app->call(@_) }; diff --git a/script/public-inbox-httpd b/script/public-inbox-httpd index 09da505e5..b8159f3a5 100755 --- a/script/public-inbox-httpd +++ b/script/public-inbox-httpd @@ -27,15 +27,6 @@ my $refresh = sub { my $www = PublicInbox::WWW->new; $www->preload; $app = builder { - eval { - enable 'Deflater', - content_type => [ qw( - text/html - text/plain - application/atom+xml - )] - }; - eval { enable 'ReverseProxy' }; $@ and warn "Plack::Middleware::ReverseProxy missing,\n", diff --git a/script/public-inbox.cgi b/script/public-inbox.cgi index c766483a2..42ab17c9e 100755 --- a/script/public-inbox.cgi +++ b/script/public-inbox.cgi @@ -13,14 +13,7 @@ BEGIN { PublicInbox::WWW->preload if $ENV{MOD_PERL}; } my $www = PublicInbox::WWW->new; -my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; my $app = builder { - if ($have_deflater) { - enable 'Deflater', - content_type => [ 'text/html', 'text/plain', - 'application/atom+xml' ]; - } - # Enable to ensure redirects and Atom feed URLs are generated # properly when running behind a reverse proxy server which # sets the X-Forwarded-Proto request header.