Branch Coverage

blib/lib/AnyEvent/HTTPD/HTTPConnection.pm
Criterion Covered Total %
branch 67 92 72.8


line true false branch
40 15 0 unless defined $$self{'request_timeout'}
48 0 15 $$self{'ssl'} ? :
61 7 0 unless ($code =~ /^(1\d\d|204|304)$/ou)
62 7 0 unless (defined $content)
72 1 24 if $$self{'transfer_cb'}
75 0 25 unless defined $$self{'hdl'} and not $$self{'disconnected'}
79 13 12 if ($$self{'keep_alive'}) { }
96 0 25 unless defined $time
109 0 25 if $$self{'disconnected'}
110 0 25 unless $$self{'hdl'}
113 25 0 unless header_exists($hdr, 'Date')
115 24 1 unless header_exists($hdr, 'Expires')
117 22 3 unless header_exists($hdr, 'Cache-Control')
119 14 11 $$self{'keep_alive'} ? :
122 23 2 unless header_exists($hdr, 'Content-Length') or ref $content
126 2 23 unless (defined header_get($hdr, 'Content-Length'))
133 3 145 unless defined $v
139 3 22 if ($no_body)
145 1 21 if (ref $content eq 'CODE') { }
151 0 5 unless defined $self and defined $$self{'hdl'} and not $$self{'disconnected'}
155 4 1 if (defined $chunk and length $chunk > 0) { }
168 0 5 unless $self
170 1 4 if (length $res) { }
4 0 elsif (not $$self{'transport_polled'}) { }
177 4 0 if $self
190 8 2 if ($str =~ /^"(.*?)"$/ou)
205 6 0 if ($$hdr{'content-disposition'} =~ /form-data|attachment/ou)
215 8 0 if ($par =~ /^".*"$/ou)
221 1 5 if ($ctype eq 'multipart/mixed') { }
252 6 0 if (my(@p) = $self->decode_part($h, $c))
258 2 4 if $e eq '--'
285 2 2 if (/^\s*boundary\s*=\s*(.*?)\s*$/ou)
299 1 17 if ($ctype eq 'multipart/form-data') { }
0 17 elsif ($ctype =~ /x-www-form-urlencoded/ou) { }
326 0 24 unless $header =~ /\G$/gosux
346 0 18 unless (defined $hdr)
352 3 15 if (defined $$hdr{'content-length'}) { }
367 0 29 if $$self{'disconnected'}
373 0 0 unless defined $self
380 0 26 unless defined $self
384 20 6 if ($line =~ m[(\S+) \040 (\S+) \040 HTTP/(\d+)\.(\d+)]osux) { }
1 5 elsif ($line eq '') { }
387 2 18 unless (grep {$meth eq $_;} @{$$self{'allowed_methods'};})
393 0 18 if ($vm >= 2)
415 2 12 if $$self{'disconnected'}
418 0 12 if $$self{'transfer_cb'}