Apache2-ClickPath

 view release on metacpan or  search on metacpan

t/session/005internal_redirect.t  view on Meta::CPAN

my $hostport = Apache::TestRequest::hostport($config) || '';
t_debug("connecting to $hostport");

mkdir "t/htdocs/bin";
open F, ">t/htdocs/bin/x.pl" and print F <<"EOF";
#!/usr/bin/perl

print "Location: /TestSession__001session_generation?SESSION\n\n";
EOF
close F;
chmod 0755, "t/htdocs/bin/x.pl";

my $got=GET_BODY( "/bin/x.pl" );
ok t_cmp( $got, qr/^SESSION=.+/m,  ), "without session";

$got=~m/^SESSION=(.+)/;
my $session=$1;

$got=GET_BODY( "/-S:$session/bin/x.pl" );
ok t_cmp( $got, qr/^SESSION=\Q$session\E/m,  ), "with session";



( run in 0.374 second using v1.01-cache-2.11-cpan-496ff517765 )