Branch Coverage

blib/lib/Plack/Middleware/RedirectSSL.pm
Criterion Covered Total %
branch 50 50 100.0


line true false branch
20 15 7 $self->ssl ? :
21 14 8 'https' eq $env->{'psgi.url_scheme'} ? :
23 9 13 if ($is_ssl xor $do_ssl)
25 2 7 if "GET" ne $m and "HEAD" ne $m
28 4 3 $do_ssl ? :
34 4 9 unless $is_ssl and my $hsts = $self->hsts_header
43 4 16 unless @_
45 10 5 $policy ? :
51 2 8 unless @_
53 6 2 $value || !defined($value) ? :
61 10 1 unless defined $self->ssl
62 5 6 if (exists $self->{'hsts_policy'}) { }
2 4 elsif (exists $self->{'hsts'}) { }
3 1 elsif (not $self->hsts_header) { }
70 10 2 if "Plack::Middleware::RedirectSSL" ne $p
75 5 35 if 1 != @_ or defined $opt and "HASH" ne ref $opt
78 7 28 unless defined $opt
85 1 27 if $unknown
91 5 9 $preload ? :
13 14 defined $max_age ? :
94 2 4 if 0 == $max_age and $include_subdomains || $preload
97 7 18 if ($preload)
98 5 2 unless defined $include_subdomains
99 1 6 unless $include_subdomains
100 1 5 if 31536000 > $max_age