Branch Coverage

blib/lib/Apache/TestRequest.pm
Criterion Covered Total %
branch 39 140 27.9


line true false branch
69 0 0 unless $have_lwp
90 0 0 if $module
96 0 0 if $scheme
115 0 0 exists $$opt{'path'} ? :
129 1 16 if (delete $$args{'reset'})
133 1 16 if (exists $$args{'requests_redirectable'})
135 0 1 if (ref $redir and @$redir > 1 || $$redir[0] ne 'POST') { }
0 1 elsif ($redir) { }
137 0 0 $have_lwp ? :
139 0 0 if ($have_lwp) { }
148 1 0 $have_lwp ? :
154 0 17 if ($$args{'keep_alive'})
167 0 0 unless $res->header('Client-Request-Num')
190 0 15 if (my $module = $Module)
191 0 0 $module eq 'default' ? :
196 0 15 unless $hostport
201 0 15 unless defined $url
203 0 15 if $url =~ m[^(\w+):/]
204 0 15 unless $url =~ m[^/]
227 3 0 if ($have_lwp)
229 1 2 if defined $RedirectOK
234 0 0 if $self->method eq 'POST'
236 0 0 if defined $RedirectOK
249 0 5 if (my $proxy = $config->configure_proxy)
263 0 0 unless $credentials{$_}
272 0 0 if $module
279 0 0 if ($module and $module =~ /ssl/) { }
315 0 0 unless $sock->can('get_peer_certificate')
326 15 0 if ($have_lwp) { }
331 0 0 if $ENV{'APACHE_TEST_DEBUG_LWP'}
337 1 14 if (defined $$keep{'username'})
341 0 15 if (defined(my $content = $$keep{'content'}))
342 0 0 if ($content eq '-') { }
0 0 elsif ($content =~ /^x(\d+)$/) { }
350 0 15 if ($$keep{'cert'})
360 0 0 exists $$keep{'redirect_ok'} ? :
364 0 0 if ($$keep{'filename'}) { }
417 0 0 unless ($r->isa('HTTP::Request') or $r->header('Content-Length') or $r->header('Transfer-Encoding'))
425 0 0 unless $want_body
440 5 0 unless $val
442 0 0 if ($val =~ /^\d+$/) { }
447 0 0 @_ ? :
457 0 0 unless ($r->request->protocol)
461 0 0 user_agent_request_num($r) ? :
478 0 27 unless $r
481 15 12 unless ($shortcut)
483 0 15 if ($r->method eq 'POST' and not defined $r->header('Content-Length'))
486 15 0 $UA ? :
488 14 1 if (defined $proto)
489 0 14 if (not $proto =~ m[^HTTP/(\d\.\d)$])
492 0 14 if ($1 ne '1.0' and $1 ne '1.1')
493 0 0 unless $1 eq '0.9' and $ENV{'APACHE_TEST_HTTP_09_OK'}
499 0 27 if ($DebugLWP and not $shortcut)
503 0 27 if $error
505 12 15 $shortcut ? :
527 1 14 exists $$keep{'redirect_ok'} ? :
548 0 0 ref $obj ? :
557 0 0 unless ($res->code == 200)
573 0 0 unless defined $same_interp and $same_interp
584 0 0 unless $res
586 0 0 if ($code == 200) { }
0 0 elsif ($code == 404) { }
597 0 0 unless ($found_same_interp eq $same_interp)
601 0 0 if ($times++ > 200)
606 0 0 $found_same_interp ? :
615 0 0 if ($name) { }
638 0 0 unless Apache::Test::have_module($module)
646 0 0 if $new = $_->can('new')
678 15 0 unless $fixup
689 0 0 if $res->is_success