### ----------------------------------------------------
### -- HTTP::Server::Async
### -- Licenses: Artistic-2.0
### -- Authors: Tony O'Dell
### -- File: t/06-responsetimeout.rakutest
### ----------------------------------------------------
use Test;

use lib 't/lib';
use starter;

plan 1;

my $s = srv;

$s.handler(sub ($request, $response) {
    sleep 10;
    $response.headers<Connection> = 'close';
    $response.close("Done");
});

$s.listen;

my $client = req;
$client.print("GET / HTTP/1.0\r\n\r\n");
my $data = 0;
while $client.recv -> $str {
    $data ~= $str;
}
ok ! $data.match(/ 'Done' /), 'Shouldn\'t see "Done"';
$client.close;

# vim: expandtab shiftwidth=4


