Skip to content

Commit

Permalink
test parsing a response without Content-Length in multiple steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 7, 2014
1 parent b7506ba commit 8ef279d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/mojo/response.t
Expand Up @@ -233,7 +233,9 @@ is $res->body, "Hello World!\n1234\nlalalala\n", 'right content';
$res = Mojo::Message::Response->new;
$res->parse("HTTP/1.0 500 Internal Server Error\x0d\x0a");
$res->parse("Content-Type: text/plain\x0d\x0a\x0d\x0a");
$res->parse("Hello World!\n1234\nlalalala\n");
$res->parse("Hello World!\n1");
$res->parse("234\nlala");
$res->parse("lala\n");
ok !$res->is_finished, 'response is not finished';
is $res->code, 500, 'right status';
is $res->message, 'Internal Server Error', 'right message';
Expand Down

0 comments on commit 8ef279d

Please sign in to comment.