Branch Coverage

blib/lib/PAGI/Middleware/ReverseProxy.pm
Criterion Covered Total %
branch 18 44 40.9


line true false branch
71 0 3 if ($scope->{'type'} ne "http")
77 3 0 exists $scope->{'client'} ? :
78 1 2 unless ($self->{'trust_all'} or $self->_is_trusted($client_ip))
90 1 1 if ($forwarded_for) { }
0 1 elsif ($real_ip) { }
95 1 0 if (exists $scope->{'client'}) { }
102 0 0 if (exists $scope->{'client'}) { }
112 1 1 if ($forwarded_proto)
114 1 0 if $forwarded_proto =~ /^https?$/
119 0 2 if ($forwarded_host)
123 0 0 if (lc $h->[0] eq 'host') { }
134 0 2 if ($forwarded_port and $forwarded_port =~ /^\d+$/)
146 0 3 if ($trusted =~ m[/]) { }
148 0 0 if $self->_ip_in_cidr($ip, $trusted)
151 2 1 if $ip eq $trusted
163 0 0 unless $ip =~ /^[\d.]+$/ and $network =~ /^[\d.]+$/
168 0 0 unless defined $ip_num and defined $net_num
178 0 0 unless @octets == 4
179 0 0 if /^\d+$/ and $_ >= 0
0 0 unless _all(sub { $_ <= 255 if /^\d+$/ and $_ >= 0; } , @octets)
187 0 0 unless &$code()
197 2 8 if lc $h->[0] eq $name