Branch Coverage

blib/lib/Arriba/Connection/HTTP.pm
Criterion Covered Total %
branch 35 60 58.3


line true false branch
18 2 1 if ($$self{'client'}->NS_proto eq 'TCP')
19 0 2 unless setsockopt $$self{'client'}, 6, 1, 1
35 8 77 if ($req = $$self{'_current_req'}) { }
77 0 elsif ($$self{'_keepalive'}) { }
38 0 27 if ($$self{'_inputbuf'})
51 8 0 if ((my $cl = $$req{'content_length'}) >= 0) { }
0 0 elsif ($chunked) { }
56 0 27 if (not defined $read or $read == 0)
78 0 0 if ($chunk_len == 0) { }
0 0 elsif (length $chunk_buffer < $chunk_len + 2) { }
92 0 0 unless $read and $read > 0
104 38 39 $$self{'ssl'} ? :
107 74 77 if defined $$self{'_inputbuf'} and $$self{'_inputbuf'} =~ /$Arriba::Connection::HTTP::CRLF$Arriba::Connection::HTTP::CRLF/s
112 3 74 if (not defined $read or $read == 0)
125 8 66 if ($$req{'headers'} =~ /^content-length:\s*(\d+)\015?$/im) { }
154 0 98 if $$res_headers[$i] eq 'Connection'
159 74 0 if ($proto eq 'HTTP/1.1') { }
160 66 8 if (not exists $headers{'content-length'}) { }
0 8 elsif (my $te = $headers{'transfer-encoding'}) { }
161 64 2 unless ($status =~ /^1\d\d|[23]04$/)
167 0 0 if ($te eq 'chunked')
173 0 0 unless (exists $headers{'transfer-encoding'})
178 74 0 if ($$self{'_keepalive'}) { }
187 72 2 if (defined $$res[2]) { }
192 68 10 if ($chunked)
194 0 68 unless $len
208 62 10 if $chunked
215 4 0 if ($chunked)
217 0 4 unless $len
223 2 0 if $chunked