]> Sergey Matveev's repositories - public-inbox.git/commitdiff
gzipfilter: check http->{forward} for client disconnects
authorEric Wong <e@yhbt.net>
Sun, 5 Jul 2020 23:27:59 +0000 (23:27 +0000)
committerEric Wong <e@yhbt.net>
Mon, 6 Jul 2020 20:01:15 +0000 (20:01 +0000)
We actually don't do anything with {env} or {'psgix.io'}
on client aborts, so checking the truthiness of '{forward}'
is necessary.

lib/PublicInbox/GzipFilter.pm

index b5ad9eb884cd7a57989b1ec1e9102f35d00bb826..f1354d2b7eb4e015a54aca61c129df1c70838ab4 100644 (file)
@@ -165,7 +165,8 @@ sub bail  {
 # this is public-inbox-httpd-specific
 sub async_blob_cb { # git->cat_async callback
        my ($bref, $oid, $type, $size, $self) = @_;
-       my $http = $self->{env}->{'psgix.io'} or return; # client abort
+       my $http = $self->{env}->{'psgix.io'};
+       $http->{forward} or return; # client aborted
        my $smsg = $self->{smsg} or bail($self, 'BUG: no smsg');
        if (!defined($oid)) {
                # it's possible to have TOCTOU if an admin runs