Hi there, While testing an application I write in Dancer2 I was trying to test the login mechanism. For this I need to send back the cookie I received from the server. I have code like this:
my $r2 = dancer_response POST => '/login', params => { username => $users{username}, password => $users{password}, }, }; my ($cookie) = $r2->header('set-cookie') =~ /(dancer.session=[^;]+);/; diag $cookie; # dancer.session=UnD4WqseotQvyKMGxpoVXSUYRASXQ0TA my $r3 = dancer_response GET => '/', { headers => [ [ 'Cookie' => $cookie ], ], }; But the server responds to the second query as if the cookie was not received by it. The same works when using a regular browser. What am I doing wrong? What do I need to do in order for the session cookie to be sent back? regards Gabor _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users