Branch Coverage

lib/HTTP/Server/Connection.pm
Criterion Covered Total %
branch 0 164 0.0


line true false branch
86 0 0 if (not $req and $$self{'HSC_no_more'})
92 0 0 if ($req) { }
97 0 0 unless $$refdata =~ s/(.*?)\r\n\r\n//s
103 0 0 unless $proto
107 0 0 if $req->protocol lt 'HTTP/1.1' or lc($headers->header('Connection') || '') ne 'keep-alive'
111 0 0 if ($proto lt 'HTTP/1.0')
116 0 0 if (my $expect = $headers->header('Expect'))
117 0 0 if (lc $expect ne '100-continue')
130 0 0 if ($te eq 'chunked') { }
0 0 elsif ($te ne '') { }
0 0 elsif (defined $cl) { }
0 0 elsif (($headers->header('Content-Type') || '') =~ m[^multipart/\w+\s*;.*boundary\s*=(["']?)\s*(\w+)\1]i) { }
131 0 0 unless my($starter, $len) = $$refdata =~ /^((\S+)\r?\n)/
132 0 0 unless ($len =~ /^[0-9a-fA-F]+$/)
141 0 0 if length $$refdata < $chunk_length
143 0 0 if ($need != 0)
149 0 0 unless $$refdata =~ /\n\r?\n/
165 0 0 if defined $cl and length $$refdata < $cl
170 0 0 unless $$refdata =~ s/(.*?\r?\n--\Q$2\E--\r?\n)//
179 0 0 if $$self{'HSC_no_more'}
183 0 0 if ($$self{'HSC_reqcount'} == 1)
185 0 0 if $ua
195 0 0 if ($req and length $$refdata and $$self{'take_all'}) { }
0 0 elsif ($$refdata =~ /\S/) { }
218 0 0 if @$queue == 1
232 0 0 unless (defined $vhostn)
233 0 0 if ($req->protocol gt 'HTTP/1.1')
242 0 0 unless (defined $vhost)
248 0 0 unless defined $resp
257 0 0 unless defined $content
259 0 0 if ($protocol ge 'HTTP/1.0') { }
260 0 0 $$self{'HSC_no_more'} ? :
265 0 0 ref $content eq 'CODE' ? :
281 0 0 if ($req->method eq 'HEAD') { }
0 0 elsif (ref $content eq 'CODE') { }
290 0 0 unless defined $chunk
291 0 0 unless length $chunk
311 0 0 defined $text && length $text ? :
325 0 0 unless is_redirect $status
329 0 0 if (defined $content and length $content)
330 0 0 $content =~ /^\s*\
342 0 0 if $headers
345 0 0 if (ref $file) { }
353 0 0 unless -e $file
356 0 0 unless -f _
359 0 0 unless sysopen $from_fh, $file, 0
369 0 0 $$self{'HSC_no_more'} ? :
374 0 0 if $ce
378 0 0 if $size
381 0 0 if ($mtime)
382 0 0 if (my $ims = $req->header('If-Modified-Since'))
384 0 0 if $mtime == $imstime
398 0 0 if ($req->method eq 'HEAD')
402 0 0 if ($status == 304)
441 0 0 unless opendir my $from_dir, $dirname
447 0 0 ref $names eq 'CODE' ? :
0 0 ref $names eq 'Regexp' ? :
451 0 0 unless ref $postfilter eq 'CODE'
461 0 0 $hide_symlinks ? :
464 0 0 if (not $hide_symlinks and -l _) { }
0 0 elsif (-d _) { }
0 0 elsif (-f _) { }
470 0 0 unless &$postfilter(\%d)
473 0 0 if ($d{'is_symlink'}) { }
0 0 elsif ($d{'is_file'}) { }
0 0 elsif ($d{'is_directory'}) { }
479 0 0 if $s > 1024
480 0 0 if $s > 1024
481 0 0 if $s > 1024
482 0 0 $s >= 100 ? :
488 0 0 if ($d{'is_file'} or $d{'is_directory'})
494 0 0 if $mode & 2048
496 0 0 if $mode & 1024
498 0 0 if $mode & 512
516 0 0 unless (pipe $reader, $writer)
522 0 0 unless (defined $pid)
528 0 0 if ($pid == 0)
558 0 0 if (ref $file) { }
562 0 0 unless open $f, '<', $file
586 0 0 if (ref $file) { }
592 0 0 unless open $f, '+>', $file
605 0 0 ref $data eq 'SCALAR' ? :