my($self, $id, $res, %options) = @_;
# TODO: Do not use Plack::Response
- my $response = Plack::Response->new($res);
+ my $response = Plack::Response->new(@$res);
$response->cookies->{ $self->session_key } = +{
value => $id,
%options,
my $body = "Counter=$counter";
$env->{'psgix.session'}->{counter} = $counter + 1;
- return [ 200, [], [ $body ] ];
+ return [ 200, [ 'Content-Type', 'text/html' ], [ $body ] ];
};
$app = Plack::Middleware::Session->wrap($app);
my $jar = HTTP::Cookies->new;
my $res = $cb->(GET "http://localhost/");
+ is $res->content_type, 'text/html';
is $res->content, "Counter=0";
$jar->extract_cookies($res);