summaryrefslogtreecommitdiffhomepage
path: root/test/perl/streaming_body_multiple_responses
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-03-14 11:06:09 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2023-03-14 11:06:09 +0000
commit28bdeec614d21d0ff2309431354e8cc389aac208 (patch)
tree30427c1dd79e80d339cf7b56f67a017fcd67318a /test/perl/streaming_body_multiple_responses
parentfa81d7a11a7ba31ddded934eac8e58e7c801d44a (diff)
downloadunit-28bdeec614d21d0ff2309431354e8cc389aac208.tar.gz
unit-28bdeec614d21d0ff2309431354e8cc389aac208.tar.bz2
Tests: added Perl test with many responses using streaming body.
Diffstat (limited to 'test/perl/streaming_body_multiple_responses')
-rw-r--r--test/perl/streaming_body_multiple_responses/psgi.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/perl/streaming_body_multiple_responses/psgi.pl b/test/perl/streaming_body_multiple_responses/psgi.pl
new file mode 100644
index 00000000..ffd026bd
--- /dev/null
+++ b/test/perl/streaming_body_multiple_responses/psgi.pl
@@ -0,0 +1,11 @@
+my $counter = 2;
+
+my $app = sub {
+ my $env = shift;
+
+ return sub {
+ my $responder = shift;
+ $responder->([200, ['Content-Type'=>'text/plain'], [$counter++]]);
+ $responder->([200, ['Content-Type'=>'text/plain'], [$counter++]]);
+ };
+};