-# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# Wrap a pipe or file for PSGI streaming response bodies and calls the
use warnings;
sub new {
- my ($class, $rpipe, $end, $end_arg, $buf, $filter) = @_;
+ my ($class, $rpipe, $end, $end_arg, $buf) = @_;
bless {
rpipe => $rpipe,
end => $end,
end_arg => $end_arg,
buf => $buf,
- filter => $filter || 0,
+ filter => 0,
}, $class;
}
my $buf = delete $self->{buf}; # initial buffer
$buf = $self->{rpipe}->getline unless defined $buf;
$self->{filter} = -1 unless defined $buf; # set EOF for next call
- $filter ? $filter->($buf) : $buf;
+ $buf;
}
sub close {