Tests: perl module.

This commit is contained in:
Andrey Zelenkov
2018-02-12 19:32:54 +03:00
parent 9646772a00
commit e2c3fa6304
15 changed files with 235 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
my $app = sub {
my ($environ) = @_;
open(my $fh, ">&", $environ->{'psgi.input'});
my $len = int($environ->{'CONTENT_LENGTH'});
$fh->read(my $body, $len);
return ['200', ['Content-Length' => $len], [$body]];
};