1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
package TestLive::01api;
use strict;
use warnings FATAL => qw(all);
use Apache::Test qw(-withtestmore);
use Apache2::Const -compile => qw(OK);
use Apache::SSLLookup;
sub handler {
my $r = shift;
plan $r, tests => 6;
$r = Apache::SSLLookup->new($r);
SKIP : {
skip 'apache 2.0.51 required', 1
unless have_min_apache_version('2.0.51');
ok($r->is_https,
'is_https() returned true');
}
ok($r->ssl_lookup('https'),
'HTTPS variable returned true');
is($r->ssl_lookup('ssl_client_verify'),
'NONE',
'SSL_CLIENT_VERIFY returned ssl.conf value');
SKIP : {
skip 'apache 2.1.3 required', 2
unless have_min_apache_version('2.1.3');
TODO : {
local $TODO = "ext_lookup() is experimental";
is($r->ext_lookup('2.5.4.3'),
'???',
'server');
is($r->ext_lookup('2.5.4.3', 1),
'???',
'client');
}
}
# can we still call $r methods?
my $ct = $r->content_type;
like ($ct,
qr!text/plain!,
'successfully called $r->content_type()');
return Apache2::Const::OK;
}
1;
__DATA__
<NoAutoConfig>
</NoAutoConfig>
|