Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.454 kb
use strict;
use warnings;
use Test::More tests => 1;
use Plack::Test;
use Plack::Request;
use Try::Tiny;
{
try {
my $data = 'a';
open my $input, "<", \$data;
my $req = Plack::Request->new({
'psgi.input' => $input,
CONTENT_LENGTH => 3,
CONTENT_TYPE => 'application/octet-stream'
});
$req->body_parameters;
} catch {
like $_, qr/Bad Content-Length/;
}
}
Jump to Line
Something went wrong with that request. Please try again.