diff options
author | Eric Wong <e@yhbt.net> | 2020-07-05 23:27:59 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-07-06 20:01:15 +0000 |
commit | 3a825edc7e2ad557b50a10780dc4118902d2635e (patch) | |
tree | 750d5ecdaf8740d2a9393dca3844d4f100704be4 /lib | |
parent | 54c25a9cfb9a5eee44672b126eb75b9bb20aa957 (diff) | |
download | public-inbox-3a825edc7e2ad557b50a10780dc4118902d2635e.tar.gz |
gzipfilter: check http->{forward} for client disconnects
We actually don't do anything with {env} or {'psgix.io'} on client aborts, so checking the truthiness of '{forward}' is necessary.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/GzipFilter.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm index b5ad9eb8..f1354d2b 100644 --- a/lib/PublicInbox/GzipFilter.pm +++ b/lib/PublicInbox/GzipFilter.pm @@ -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 |