diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-26 19:53:40 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-02-26 19:53:40 +0300 |
commit | a89747e97c2a00503260d72082949be4ba97983f (patch) | |
tree | 424fea2951f83cde3f73365a0869cff92fad2a39 /test/perl | |
parent | 6d79c559b5cebeb2ad7c5dbdb779e3bec26fc08a (diff) | |
download | unit-a89747e97c2a00503260d72082949be4ba97983f.tar.gz unit-a89747e97c2a00503260d72082949be4ba97983f.tar.bz2 |
Tests: more perl tests.
Diffstat (limited to 'test/perl')
-rw-r--r-- | test/perl/header_equal_names/psgi.pl | 9 | ||||
-rw-r--r-- | test/perl/input_read_parts/psgi.pl | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/perl/header_equal_names/psgi.pl b/test/perl/header_equal_names/psgi.pl new file mode 100644 index 00000000..70bc8aa6 --- /dev/null +++ b/test/perl/header_equal_names/psgi.pl @@ -0,0 +1,9 @@ +my $app = sub { + my ($environ) = @_; + + return ['200', [ + 'Content-Length' => 0, + 'Set-Cookie' => 'tc=one,two,three', + 'Set-Cookie' => 'tc=four,five,six' + ], []]; +}; diff --git a/test/perl/input_read_parts/psgi.pl b/test/perl/input_read_parts/psgi.pl new file mode 100644 index 00000000..f68ac49c --- /dev/null +++ b/test/perl/input_read_parts/psgi.pl @@ -0,0 +1,10 @@ +my $app = sub { + my ($environ) = @_; + + $len_1 = $environ->{'psgi.input'}->read(my $body_1, 4); + $len_2 = $environ->{'psgi.input'}->read(my $body_2, 4); + $len_3 = $environ->{'psgi.input'}->read(my $body_3, 2); + + return ['200', ['Content-Length' => $len_1 + $len_2 + $len_3], + [$body_1 . $body_2 . $body_3]]; +}; |