Branch Coverage

blib/lib/Bio/Das/HTTP/Fetch.pm
Criterion Covered Total %
branch 66 150 44.0


line true false branch
59 0 1 unless (defined &EINPROGRESS)
131 0 6 unless $request
136 0 6 unless $host
138 0 6 if (not $user and $request->auth)
147 0 6 unless ($sock)
152 0 6 if $proxy
153 0 6 $user ? :
249 0 6 if @_
265 0 6 unless $meth
266 6 0 if ($meth eq 'AUTO')
267 6 0 $self->outgoing_args ? :
289 24 360 if (@_)
291 0 24 if $self->debug
305 0 150 if @_
324 0 6 unless my($ssl, $hostent, $path) = $url =~ m[^http(s?)://([^/]+)(/?[^\#]*)]
329 0 6 if $user
330 0 0 if ($pass and not $ssl and not $norfcwarn)
336 0 6 if ($ssl) { }
360 0 6 if ($mode eq 'https') { }
371 0 6 unless $sock
373 0 6 unless my $host_ip = inet_aton($host)
376 6 0 if $result
377 0 0 if $! == 115
399 0 6 if $self->debug
401 0 6 unless $self->status eq 'waiting'
404 0 6 unless ($$self{'socket'}->connected)
411 0 6 if ($self->mode eq 'https')
412 0 0 unless $self->complete_ssl_handshake($$self{'socket'})
417 0 6 if $self->debug
423 0 6 unless ($bytes)
424 0 0 if $! == 11
425 0 0 if $$self{'socket'}->errstr =~ /SSL wants a write/
428 6 0 if ($bytes >= length $$self{'formatted_request'}) { }
450 6 114 if $stat eq 'reading header'
451 114 0 if $stat eq 'reading body' or $stat eq 'parsing body'
461 0 6 unless (defined $bytes)
462 0 0 if $! == 11
463 0 0 if $$self{'socket'}->errstr =~ /SSL wants a read/
465 0 6 unless $bytes > 0
469 0 6 unless $i >= 0
480 0 6 if ($stat_code == 401)
482 0 0 if (my($line) = grep(/^WWW-Authenticate:\s+/, @other_lines))
484 0 0 if ($scheme ne 'Basic')
493 0 6 unless $stat_code == 200
496 0 6 unless $self->do_headers(@other_lines)
499 6 0 if length $extra_data
511 108 6 if ($result) { }
6 0 elsif (defined $result) { }
512 0 108 unless $self->do_body($data)
518 6 0 if $self->request
525 0 0 if $! == 11
526 0 0 if $$self{'socket'}->errstr =~ /SSL wants a write/
528 0 0 if (my $cb = $self->request)
555 0 6 if $auth
556 3 3 if $args and $method eq 'POST'
561 3 3 if $method eq 'POST' and not $args
579 6 0 if (my $a = $self->outgoing_args)
581 9 5 unless defined $$a{$_}
583 5 0 ref $$a{$_} eq 'ARRAY' ? :
612 0 30 if $h =~ /\s/
613 0 30 ref $headers{$h} eq 'ARRAY' ? :
670 0 42 unless my($header, $value) = /^(\S+): (.+)$/
671 0 42 $headers{$header} ? :
674 6 0 if (my $request = $self->request)
675 0 6 unless $request->headers(\%headers)
692 0 114 unless my $request = $self->request
693 6 108 if ($self->status eq 'reading body')
694 0 6 unless $request->start_body
698 0 114 if $self->debug
713 0 120 if (@_) { }
714 0 0 unless (ref $self)
718 0 0 if $self->debug
722 120 0 ref $self ? :
733 0 0 unless eval 'require IO::Socket::SSL'
736 0 0 unless defined &IO::Socket::SSL::pending