Apache2-Filter-HTTPHeadersFixup

 view release on metacpan or  search on metacpan

t/manip/in_append.t  view on Meta::CPAN

t_debug("connecting to $hostport");

my $keep_alive_times     = 3;
my $non_keep_alive_times = 3;
my $times = $non_keep_alive_times + $keep_alive_times + 1;

plan tests => 6 * $times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate() for 1..$non_keep_alive_times;

## try keepalive conns
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1);
validate() for 1..$keep_alive_times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate();

# 6 sub-tests
sub validate {
    my $key = "Leech";
    my $val = "Hungry";

    {
        my $res = HEAD $location;

        ok t_cmp $res->content, "", "there should be no content / HEAD";

        ok t_cmp $res->header($key)||'', $val, "appended header / HEAD ";
    }

t/manip/in_modify.t  view on Meta::CPAN

t_debug("connecting to $hostport");

my $keep_alive_times     = 3;
my $non_keep_alive_times = 3;
my $times = $non_keep_alive_times + $keep_alive_times + 1;

plan tests => 6 * $times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate() for 1..$non_keep_alive_times;

# try keepalive conns
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1);
validate() for 1..$keep_alive_times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate();

# 6 sub-tests
sub validate {

    my $key = "Sign-Here";
    my $val = "DigSig";

    {
        my $res = HEAD $location, $key  => "";

        ok t_cmp("", $res->content, "there should be no response body / HEAD ");

        ok t_cmp($val, $res->header($key)||'', "modified header / HEAD ");

t/manip/out_append.t  view on Meta::CPAN

t_debug("connecting to $hostport");

my $keep_alive_times     = 3;
my $non_keep_alive_times = 3;
my $times = $non_keep_alive_times + $keep_alive_times + 1;

plan tests => 6 * $times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate() for 1..$non_keep_alive_times;

# try keepalive conns
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1);
validate() for 1..$keep_alive_times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate();

# 6 sub-tests
sub validate {

    my $key = "Leech";
    my $val = "Hungry";

    {
        my $res = HEAD $location;

        ok t_cmp("", $res->content, "there should be no content / HEAD");

        ok t_cmp($val, $res->header($key)||'', "appended header / HEAD ");

t/manip/out_modify.t  view on Meta::CPAN

t_debug("connecting to $hostport");

my $keep_alive_times     = 3;
my $non_keep_alive_times = 3;
my $times = $non_keep_alive_times + $keep_alive_times + 1;

plan tests => 6 * $times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate() for 1..$non_keep_alive_times;

# try keepalive conns
Apache::TestRequest::user_agent(reset => 1, keep_alive => 1);
validate() for 1..$keep_alive_times;

## try non-keepalive conn
Apache::TestRequest::user_agent(reset => 1, keep_alive => 0);
validate();

# 6 sub-tests
sub validate {
    my $key = "Sign-Here";
    my $val = "DigSig";

    {
        my $res = HEAD $location, $key  => "";

        ok t_cmp("", $res->content, "there should be no response body / HEAD ");

        ok t_cmp($val, $res->header($key)||'', "modified header / HEAD ");
    }



( run in 1.256 second using v1.01-cache-2.11-cpan-140bd7fdf52 )