From f8452838207d56892fb80b5976b37aab1efcaa1e Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 27 Dec 2021 16:37:35 +0300 Subject: Perl: creating input and error streams if closed. Application handler can do anything with a stream object (including close it). Once the stream is closed, Unit creates a new stream. This closes #616 issue on GitHub. --- test/perl/input_close/psgi.pl | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/perl/input_close/psgi.pl (limited to 'test/perl/input_close') diff --git a/test/perl/input_close/psgi.pl b/test/perl/input_close/psgi.pl new file mode 100644 index 00000000..4a2d9bb9 --- /dev/null +++ b/test/perl/input_close/psgi.pl @@ -0,0 +1,8 @@ +my $app = sub { + my ($environ) = @_; + + $environ->{'psgi.input'}->read(my $body, 1024); + $environ->{'psgi.input'}->close(); + + return ['200', ['Content-Length' => length $body], [$body]]; +}; -- cgit