Skip to content

Commit

Permalink
added a few HTTP/1.0 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 18, 2013
1 parent 0c6749f commit 30cacec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/mojo/app.t
Expand Up @@ -125,6 +125,16 @@ is $tx->res->code, 200, 'right status';
is $tx->res->headers->connection, 'close', 'right "Connection" value';
is $tx->res->body, 'Whatever!', 'right content';

# HTTP/1.0 request
$tx = $ua->build_tx(GET => '/normal/');
$tx->req->version('1.0');
$tx = $ua->start($tx);
ok !$tx->keep_alive, 'will not be kept alive';
is $tx->res->version, '1.1', 'right version';
is $tx->res->code, 200, 'right status';
is $tx->res->headers->connection, 'close', 'right "Connection" value';
is $tx->res->body, 'Whatever!', 'right content';

# POST request
$tx = $ua->post('/fun/' => {Expect => 'fun'} => 'foo bar baz' x 128);
ok defined $tx->connection, 'has connection id';
Expand Down

0 comments on commit 30cacec

Please sign in to comment.