Branch Coverage

blib/lib/HTTP/Daemon.pm
Criterion Covered Total %
branch 5 202 2.4


line true false branch
26 0 0 if (exists $args{$key} and !defined($args{$key}) || $args{$key} eq '')
37 0 0 if ($sock) { }
39 0 0 wantarray ? :
51 0 1 if $host eq "0.0.0.0"
52 0 1 if $host eq "::"
53 1 0 if $self->sockdomain == 10
57 1 0 if $port != $self->_default_port
100 0 0 if (do { *$self }->{'httpd_nomore'})
107 0 0 unless defined $buf
119 0 0 if ($buf =~ /\012/) { }
0 0 elsif (length $buf > 16384) { }
120 0 0 if ($buf =~ m[^\w+[^\012]+HTTP/\d+\.\d+\015?\012]) { }
121 0 0 if ($buf =~ /\015?\012\015?\012/) { }
0 0 elsif (length $buf > 16384) { }
139 0 0 if $DEBUG
140 0 0 unless $self->_need_more($buf, $timeout, $fdset)
142 0 0 unless ($buf =~ s[^(\S+)[ \t]+(\S+)(?:[ \t]+(HTTP/\d+\.\d+))?[^\012]*\012][])
151 0 0 if $method eq "CONNECT"
158 0 0 if ($proto >= $HTTP_1_0)
166 0 0 if (/^([^:\s]+)\s*:\s*(.*)/) { }
0 0 elsif (/^\s+(.*)/) { }
167 0 0 if $key
177 0 0 if $key
181 0 0 if ($proto >= $HTTP_1_1) { }
182 0 0 if $conn and lc($conn) =~ /\bclose\b/
185 0 0 unless $conn and lc($conn) =~ /\bkeep-alive\b/
189 0 0 if ($only_headers)
201 0 0 if (lc $e eq '100-continue') { }
212 0 0 if ($tr_enc and lc $tr_enc eq 'chunked') { }
0 0 elsif ($tr_enc) { }
0 0 elsif ($ct_len) { }
0 0 elsif ($ct_type and $ct_type =~ m[^multipart/\w+\s*;.*boundary\s*=\s*("?)(\w+)\1]i) { }
218 0 0 if $DEBUG
219 0 0 if ($buf =~ s/^([^\012]*)\012//) { }
221 0 0 unless ($chunk_head =~ /^([0-9A-Fa-f]+)/)
227 0 0 if $size == 0
232 0 0 if $DEBUG
234 0 0 unless $n
243 0 0 unless $self->_need_more($buf, $timeout, $fdset)
255 0 0 if (not $buf =~ /\012/) { }
258 0 0 unless $self->_need_more($buf, $timeout, $fdset)
264 0 0 if (/^([\w\-]+)\s*:\s*(.*)/) { }
0 0 elsif (/^\s+(.*)/) { }
0 0 elsif (not length $_) { }
265 0 0 if $key
280 0 0 if $key
301 0 0 unless (@vals == @nums)
310 0 0 if $_ == $ct_len
322 0 0 if $DEBUG
324 0 0 unless $n
327 0 0 if (length $buf > $ct_len) { }
343 0 0 if $index >= 0
346 0 0 unless $self->_need_more($buf, $timeout, $fdset)
362 0 0 if ($_[1])
364 0 0 if $DEBUG
366 0 0 unless ($n)
367 0 0 defined $n ? :
371 0 0 if $DEBUG
373 0 0 defined $n ? :
0 0 unless $n
380 0 0 if (@_)
389 0 0 if (@_)
402 0 2 unless m[^(?:HTTP/)?(\d+)\.(\d+)$]i
424 0 0 if $self->antique_client
438 0 0 if $self->antique_client
442 0 0 if $product
449 0 0 unless defined $v
457 0 0 unless (ref $res)
463 0 0 unless ($self->antique_client)
466 0 0 if ($code =~ /^(1\d\d|[23]04)$/) { }
0 0 elsif ($res->request and $res->request->method eq 'HEAD') { }
0 0 elsif (ref $content eq 'CODE') { }
0 0 elsif (length $content) { }
477 0 0 if ($self->proto_ge('HTTP/1.1')) { }
495 0 0 if ($self->head_request) { }
0 0 elsif (ref $content eq 'CODE') { }
0 0 elsif (length $content) { }
502 0 0 unless defined $chunk and length $chunk
503 0 0 if ($chunked) { }
510 0 0 if $chunked
520 0 0 unless &is_redirect($status)
523 0 0 unless ref $loc
527 0 0 if ($content)
528 0 0 $content =~ /^\s*
532 0 0 if $content and not $self->head_request
539 0 0 unless &is_error($status)
547 0 0 unless ($self->antique_client)
553 0 0 unless $self->head_request
559 0 0 if (-d $file) { }
0 0 elsif (-f _) { }
566 0 0 unless sysopen F, $file, 0
570 0 0 unless ($self->antique_client)
573 0 0 if $file_enc
574 0 0 if $size
575 0 0 if $mtime
578 0 0 unless $self->head_request
588 0 0 unless -d $dir
596 0 0 unless (ref $file)
597 0 0 unless open FILE, $file
606 0 0 unless $n
610 0 0 if $opened