Branch Coverage

blib/lib/PAGI/Middleware/CSRF.pm
Criterion Covered Total %
branch 19 22 86.3


line true false branch
76 0 8 if ($scope->{'type'} ne "http")
90 3 5 if ($self->{'safe_methods'}{$method})
98 3 3 if ($event->{'type'} eq "http.response.start")
105 0 3 $cookie_token ? :
115 1 2 unless ($submitted_token and $cookie_token and $self->_secure_compare($submitted_token, $cookie_token))
141 4 4 unless $cookie_header
144 4 0 if ($cookie_header =~ /(?:^|;\s*)\Q$name\E=([^;]+)/)
155 3 2 if $token
167 7 4 if lc $h->[0] eq $name
176 3 14 unless defined $a and defined $b
177 5 9 unless length $a == length $b