Skip to content

Commit

Permalink
Add a new test with a big (> 127 bytes) HTTP header value
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Dec 12, 2009
1 parent 4afa7b5 commit dd12774
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion lib/Plack/Test/Suite.pm
Expand Up @@ -416,7 +416,26 @@ our @TEST = (
];
},
],

[
'a big header value > 128 bytes',
sub {
my $cb = shift;
my $req = GET "http://127.0.0.1/";
my $v = ("abcdefgh" x 16);
$req->header('X-Foo' => $v);
my $res = $cb->($req);
is $res->code, 200;
is $res->content, $v;
},
sub {
my $env = shift;
return [
200,
[ 'Content-Type' => 'text/plain' ],
[ $env->{HTTP_X_FOO} ],
];
},
],
);

sub runtests {
Expand Down

0 comments on commit dd12774

Please sign in to comment.