about summary refs log tree commit homepage
path: root/lib/PublicInbox/GitHTTPBackend.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-25 03:10:50 +0000
committerEric Wong <e@80x24.org>2016-02-25 04:03:02 +0000
commit8968889e3ebfa09dd2c80fe8b917b83ac13ff356 (patch)
treed7d27284f53eb7b0dc11ed5ee2c64ba1ec1ed738 /lib/PublicInbox/GitHTTPBackend.pm
parent62a77b55c9fadec1b4b1ba061e99f4a18d8a14bc (diff)
downloadpublic-inbox-8968889e3ebfa09dd2c80fe8b917b83ac13ff356.tar.gz
Relying on Plack::Handler::CGI is much easier for long-term
maintenance and development.

Nowadays, we even include our own httpd implementation to
facilitate easier deployment with PSGI/Plack.
Diffstat (limited to 'lib/PublicInbox/GitHTTPBackend.pm')
-rw-r--r--lib/PublicInbox/GitHTTPBackend.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index 71b7a8f1..562c290e 100644
--- a/lib/PublicInbox/GitHTTPBackend.pm
+++ b/lib/PublicInbox/GitHTTPBackend.pm
@@ -55,7 +55,7 @@ sub serve {
         my $len = $size;
         my @h;
 
-        my $env = $cgi->{env} || \%ENV;
+        my $env = $cgi->{env};
         my $range = $env->{HTTP_RANGE};
         if (defined $range && $range =~ /\bbytes=(\d*)-(\d*)\z/) {
                 ($code, $len) = prepare_range($cgi, $in, \@h, $1, $2, $size);
@@ -117,9 +117,7 @@ sub prepare_range {
                         push @$h, "bytes $beg-$end/$size";
 
                         # FIXME: Plack::Middleware::Deflater bug?
-                        if (my $env = $cgi->{env}) {
-                                $env->{'psgix.no-compress'} = 1;
-                        }
+                        $cgi->{env}->{'psgix.no-compress'} = 1;
                 }
         }
         ($code, $len);