Branch Coverage

blib/lib/Mojolicious/Plugin/DigestAuth/RequestHandler.pm
Criterion Covered Total %
branch 58 66 87.8


line true false branch
31 67 3 unless defined $$header{'qop'}
45 62 8 unless defined $$self{'support_broken_browsers'}
48 1 67 unless $VALID_QOPS{$qop}
52 1 68 unless $VALID_ALGORITHMS{$$self{'algorithm'}}
53 1 67 if $$self{'algorithm'} eq $ALGORITHM_MD5_SESS and not %{$$self{'qops'};}
79 25 0 if $t
93 28 1 if $t and $sig
115 36 32 if ($auth)
117 7 29 unless ($self->_valid_header($header))
122 25 4 if ($self->_authorized($header))
123 24 1 unless $self->_nonce_expired($$header{'nonce'})
136 32 36 unless $self->_request->headers->authorization
163 30 3 if $self->_header_complete($header) and $self->_url_matches($$header{'uri'}) and $self->_valid_qop($$header{'qop'}, $$header{'nc'}) and $self->_valid_opaque($$header{'opaque'})
175 1 35 unless $auth_url
180 3 32 if ($self->_support_broken_browser)
183 1 2 if ($self->_request->method eq 'GET' and $i != -1 and index($auth_url, '?') == -1)
206 1 34 if ($$env{'REQUEST_URI'}) { }
3 31 elsif ($$env{'SCRIPT_NAME'}) { }
31 0 elsif ($self->_request->url) { }
211 2 1 if $$env{'PATH_INFO'}
212 1 2 if $$env{'QUERY_STRING'}
236 0 42 if ($part eq '..' and @normalized)
253 64 3 if $$self{'support_broken_browsers'}
267 33 0 if (defined $qop) { }
282 29 3 unless $self->_support_broken_browser
289 36 0 if $header and $$header{'realm'} and $$header{'nonce'} and $$header{'response'} and $$header{'algorithm'}
302 37 0 if ($$header{'stale'} or not $$header{'nonce'})
311 1 222 unless $v
312 184 38 unless exists $no_quote{$k}
322 1 28 unless $self->_valid_nonce($$header{'nonce'})
325 2 26 unless $a1
328 26 0 if ($$header{'qop'}) { }
346 0 26 if ($hash and $$header{'algorithm'} and $$header{'algorithm'} eq $ALGORITHM_MD5_SESS)